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
Offline Capabilities in the Canvas App within Dynamics 365 – Part 3
Creating Offline Profiles Directly from Maker Studio In our previous blog, we explored how to enable offline capabilities in Canvas apps and h...
Power Apps – Public preview for Microsoft 365 Copilot chat in canvas apps
We are announcing Microsoft 365 Copilot chat for canvas apps in Power Apps. This feature is now available for public preview. How does this af...
How to add smart offline capabilities in embedded canvas apps
Learn how to smartly add offline capabilities in embedded canvas apps! You can store multiple records related to multiple different records! T...
How to add offline capabilities in embedded canvas apps
Have you ever wanted to add offline or caching capabilities to embedded canvas apps? Learn a very simple way to make that happen! The post How...
Power Apps – Enable online mode to access Dataverse for Canvas apps
We are announcing the ability to enable online mode to access Dataverse for Canvas apps in Power Apps. This feature will reach public preview ...
New quality updates to modern controls in canvas apps
This release delivers quality and reliability improvements across nine modern controls in canvas apps, including Combo Box, Text Input, and Da...
How to change the attachment on a note in canvas apps
Changing the attachment of a note is super easy in a model-driven app, not so much in a canvas app. Learn how to do it! The post How to change...
How to add a title and description when uploading an attachment in canvas apps
Uploading attachments through model-driven apps allows you to specify title & description but canvas app doesn't. Learn how you can! The...
How to work with Dataverse Attachments in canvas apps
Learn how to work with the Attachments Dataverse table in canvas apps. We will review how to create, delete, and view existing attachments! Th...