SharePoint SPFx Component ID {0} exists in solution {1} already error


Recently we were trying to deploy SharePoint SPFx client side webparts solution package to the Office 365 SharePoint tenant app catalog, but we couldn't because of an error "Component ID {0} exists in solution {1} already error"

The problem - SharePoint app catalog package error

The case was that we were trying to deploy SharePoint Framework solution package (.sppkg) to the app catalog. Instead of success got that error in the SharePoint app catalog list ('App Package Error Message' field):

Component ID {0} exists in solution {1} already

The solution - Duplicated SPFx web part ID

Well it is a human error. It appeared that we have duplicate webpart ID in another SPFx solution package already installed in the app catalog. So be careful when you copy SharePoint Framework wepbarts from one solution into another or within the same one.

Conclusion - SPFx webpart ID should be unique

Every SPFx webpart ID should be unique, no matter if they are in one solution package (.sppkg) or in different.

Sharing is Caring
Posted on

Tags: SharePoint, AppCatalog, SPFx solution package, Office 365 Tenant, Deploy SPPKG,

Comments
Lukas | 03 Oct 2017

Hi, I've come across the same issue today. However, I still haven't found a solution to my problem. I would like to deploy my app twice into the catalog - one for testing and one for production use. I thought it would be as easy as changing a few IDs before creating the package, but even if it is, I cannot figure out which values need to be changed. I have developed a SPFx solution, successfully deployed the production version and tried these steps for the testing one:

- Modifying the ID in the *.manifest.json file
- Modifying the ID in the package-solution.json file
- Changing the name (as well as the filename) of the solution

Each time I deploy the version with the IDs changed, SharePoint still comes up with the error "SharePoint SPFx Component ID {0} exists in solution {1} already error". Any ideas on how to handle this? Thank you!


Velin Georgiev | 03 Oct 2017

Hi Lukas,

The tree steps mentioned by you is exactly what we do before we deploy.

The error might happen when two packages have the SPFx Webpart GUID duplicate in *.manifest.json file.

Bear in mind the duplicate can be in the same package meaning that two different SharePoint webparts can have the same GUID copied by mistake.

Make sure you have completely removed the solutions from the app catalog and redeploy because the versioning of the app catalog list may still check if previous versions or GUIDs for some reason.

Make sure that these IDs are unique and not used in third solution-package.

I will double check tomorrow with my colleagues if we do something else before deploy, but I do not think so.


Lukas | 04 Oct 2017

Hi Velin,

Thanks for your reply. It is now working fine. I think the issue was the fact I never really bothered generating new IDs from scratch. I simply copied the existing ones and replaced the last character in the GUID string.

Example:

Existing GUID: 6b021be2-9a6c-5f16-2fd6-735ba545d2cb
New GUID: 6b021be2-9a6c-5f16-2fd6-735ba545d2cc

Do you know if SharePoint does partial matches of these strings when comparing?


Velin Georgiev | 04 Oct 2017

Hey Luckas,

I do not know for sure, but I assume that should do full match. That should be the whole idea behind using Guid.

Cheers