Canvas app code component error "Couldn't import components"
If you are developing code components (PCF) for canvas apps you'll be used to using the 'Get more components' panel. When adding the code-component to the canvas app, occasionally you will receive the somewhat unhelpful error:
Couldn't import components
There are no more details provided in the expanded down arrow area:

I'm putting this here for my future self (who always seems to forget about this issue) and anyone else who comes across this error.
The cause is usually because you have a property-set that has the same name as an in-build property or one of your own (e.g. Enabled/Selected)
The resolution is simply to prefix your property-set names with the name of the data-set:
<data-set name="Items" ... > <property-set name="ItemsSelected" .. /> <property-set name="ItemsEnabled" .. /> </data-set>
Hope this helps!
Published on:
Learn moreRelated posts
Power Apps – Deprecation of Maker Copilot in canvas apps
We are announcing the deprecation of the Edit your app with Copilot in Power Apps Studio (preview) in canvas apps. The deprecation will begin ...
Set Combo Box Value Dynamically by other Combo Box Value in Canvas APP
In this post You will come to know how to Set Default Selected Items of a Combo Box as per value selected in another Combo BOX. Problem Statem...
Power Apps – Create offline profiles in the maker studio for Canvas apps
We are announcing the ability to create offline profiles in the maker studio for Canvas apps in Power Apps. This feature will reach general av...
Power Apps – Create offline profiles in the maker studio for Canvas apps
We are announcing the ability to create offline profiles in the maker studio for Canvas apps in Power Apps. This feature will reach general av...
Power Apps – Manage your source code for canvas apps
We are announcing the ability to manage your source code for canvas apps in Power Apps. This feature will reach general availability on Septem...
Embedding Canvas Apps into Model-Driven Forms for a Unified Experience
In Microsoft Power Apps, there are two main application types—canvas apps and model-driven apps—each serving unique purposes. While model-driv...
Canvas App Error: “Row Size Exceeded” – Causes, Fixes, and Best Practices
When building Canvas Apps with Dataverse, you might see this error: The total size of the columns used in the database command exceeded t...