0
votes

I'm having some trouble deploying my .sppkg file to Sharepoint 2019. I've developed it using the SPFx framework version v1.4.1 to ensure it is compatible, and the webpart works fine when deployed in development mode against the Sharepoint environment's workbench (https://your-sharepoint-site/_layouts/workbench.aspx).

However, after uploading the webpart to the app catalog, it displays the general error message :

Error in client-side code

and is unable to deploy. In the logs for the Sharepoint environment, after uploading the package this error appears:

Caught an exception while updating the properties of SharePoint App package AppCatalog/my-webpart-app.sppkg. Error: There were errors when validating the App package: Error in the application. Stack Trace:
at Microsoft.SharePoint.Marketplace.CorporateCuratedGallery.SPCorporateCatalogEventReceiver.PromoteProperties(SPListItem listItem, Stream packageStream, Boolean addingPackage)
at Microsoft.SharePoint.Marketplace.CorporateCuratedGallery.SPCorporateCatalogEventReceiver.HandleItemAddedOrUpdated(SPListItem listItem, Boolean categoryChanged, Boolean addingPackage, Boolean isDeploying, Boolean beforeIsDeployed, Boolean beforeIsCurrentVersionDeployed)

The same package deploys fine in a Sharepoint Online environment. I don't have another 2019 environment to test in.

I'm a bit at a loss of how to debug. A test .sppkg file built from the starter SPFx project using version 1.4.1 deploys just fine, so my only thought is to slowly add functionality to the base package and deploy new versions until it breaks, but that feels a bit like madness.

Does anyone have any insight into what part of the packaging process might cause the .sppkg file to be unable to run when uploaded? Could it be permissioning issues in the environment?

1

1 Answers

1
votes

Metadata of you .sppkg has errors: There were errors when validating the App package: Error in the application.

I think, main error - you not create clean project. Create clean project, by using this info

yo @microsoft/sharepoint

Don't mistake, answer this question:

Which baseline packages do you want to target for your component(s)?

There are 2016, 2019, SharePoint Online only (latest)

If your package was created for sharepoint online - it not be added to sharepoint 2019 On Premis.

Permissions errors you will see in app catalog, and uls logs. Your error - incorrect metadata of package.

Sharepoint starter kit has this info

Starter Kit Version 1 includes a comprenshive strategy for only SharePoint Online, as well as a single SPFx solution that encapsulates all webparts and extensions into a single package. Version 1 may be accessed via the v1 branch for legacy purposes and will not be maintained beyond April 2020. link

so, don't modify it:) it's alredy legacy.

For developer own packages on premises - you can create single server farm. If you work in sharepoint online - you can use Office 356 developer programm