Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Not able to setup SP2016/SP2019 onprem using @microsoft/sharepoint yoeman generator #3621
Expected or Desired Behavior
Using @microsoft/sharepoint yoeman generator, one should be able to create SP2016 onprem project using spfx with the generated node modules and other files.
After installing @microsoft/sharepoint yoeman generator, by running
Steps to Reproduce
Kindly please share steps to setup SP2016 onprem with React, without errors.
According to the release notes for 1.8, the property pane functionality was moved from sp-webpart-base into sp-property-pane, however no '@microsoft/sp-property-pane' reference is included in the default package.json file (at least it's not in mine which was created by the generator). It will therefore not compile.
Not sure how to add the proper '@microsoft/sp-property-pane' package since using npm to try to install it results in what appears to be a react installation (I chose no react during the yo scaffolding for my test project for 2016 and beyond), which breaks damn near everything.
So, the default scaffolding is broken for 1.8 when trying to start with an on-prem 2016 bare bones web part.
It seems that from v1.7.1 and above doesn't support SP2016 onprem with react setup, though they are providing it in the generator as an option. Not sure about V1.7.0.
But, V1.6.0 worked for me. only problem is that all the functionalities are a bit old compared to the latest available features.
It would be great if support for SP2016 onprem with react is provided in the latest versions as well...
Ah, sorry. I see what happened. The code change to handle the property pane logic moving was (incorrectly) applied to the onPrem solution. While waiting for a fix, the easiest thing to do in order to get unblocked is to go to "helloworld.ts" and move imports from sp-property-pane back to sp-webpart-base. It will also have a tslint warning in the tsx file. Just replace the " with ' .
In my case, that's been tried. I get a validation error when running gulp serve (during the write-manifests task):
Manifest validation error:
Data does not match any schemas from 'oneOf'
Not sure why that's happening
This is my package.json:
I changed the web part to reference the property pane stuff back to sp-webpart-base
When you run gulp serve the 'write-manifests' taks is a subtask:
[22:48:46] Starting subtask 'write-manifests'...
This happens as a result of changing the property pane references to use sp-webpart-base.
Again, my setup is:
sharepoint generator: 1.8.0
referenced this issue
Mar 21, 2019
referenced this issue
Mar 22, 2019
I am having the same issue as the OP, including the difficulty running
Really hope you guys can turn around an answer to our problems.
OK, got it. My bad, I've been running
Remove that line. We'll get this fixed in the generator as well.
Needs: Author Feedback
Apr 1, 2019
Just to recap the fixes needed for SP2016 and SP2019 with manual workarounds:
ERROR 1 -
This is caused by referencing IPropertyPaneConfiguration and PropertyPaneTextField from wrong package. Update reference in the web part file for that import as follows:
Caused by unknown attribute in the web part manifest file. Move to web part manifest file and remove following line completely:
Fix for both issues will be provided in upcoming 1.8.1 version of the SPFx Yeomean generator. We will be closing this issue when fixes are available.
Perhaps this error is not actually related to this issue, but now after these changes my web part works well in a local workbench, but when I try to add it to the SharePoint page I can see the following error.
***Manifest not found for component id "0d910c1c-13b9-4e1c-9aa4-b008c5e42d7d" and version "16.7.0".