Forum Discussion

Merindiya's avatar
Merindiya
Copper Contributor
Nov 18, 2020

SPFX Package Error in SharePoint

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'.

3 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.

    • merindiya2040's avatar
      merindiya2040
      Copper Contributor

      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
      • frodale's avatar
        frodale
        Copper Contributor

        merindiya2040 

         

        I had the same issue after installing 'SharePoint Server 2016 Client Components SDK'

        https://www.microsoft.com/en-us/download/details.aspx?id=51679

         

        that overrides the appmanifests.xsd file under

        C:\Program Files\Common Files\microsoft shared\Web Server Extensions\16\TEMPLATE\XML\appmanifests.xsd

         

        To fix the issue, you can install 'SharePoint Online Client Components SDK'

        https://www.microsoft.com/en-us/download/details.aspx?id=42038

         

         

Resources