SPFX Package Error in SharePoint

Occasional Visitor

We are getting the below error while trying to deploy SPFX webpart in SharePoint  .We are using SharePoint 2019 On-premise.

When generating the package it does not generate any errors but when I upload it to the App Catalog library it gives me the following errors

 

There were errors when validating the App manifest.: Xml Validation Exception: 'The 'IsClientSideSolution' attribute is not declared.' on line '1', position '251'., Xml Validation Exception: 'The element 'Properties' in namespace 'http://schemas.microsoft.com/sharepoint/2012/app/manifest'
 has incomplete content. List of possible elements expected: 'StartPage' in namespace 'http://schemas.microsoft.com/sharepoint/2012/app/manifest'.'
 on line '1', position '342'., Xml Validation Exception: 'The element 'App' in namespace 'http://schemas.microsoft.com/sharepoint/2012/app/manifest'
 has incomplete content. List of possible elements expected: 'AppPrincipal' in namespace 'http://schemas.microsoft.com/sharepoint/2012/app/manifest'.'
 on line '1', position '355'.

2 Replies

@Merindiya In the root of your project, you will find a file called ".yo-rc.json", can you please past the contents of that?

I am going to guess that the targeted environment for your SPFx solution is not for on-premises. You have to use SPFx 1.4.1 for on-premises 2019.

@Beau Cameron 

Apologies for late reply 

 

{
  "@microsoft/generator-sharepoint": {
    "isCreatingSolution"true,
    "environment""onprem",
    "version""1.11.0",
    "libraryName""process-hierarchy",
    "libraryId""57db1213-4b82-4694-8ab7-8516a2e11f5a",
    "packageManager""npm",
    "componentType""webpart"
  }
}
 
 
This is my yo-rc file