-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not able to setup SP2016/SP2019 onprem using @microsoft/sharepoint yoeman generator #3621
Comments
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible. |
Can you paste your package.json here? |
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. |
Package.json is the default one being generated by the generator. |
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: "$schema": "https://developer.microsoft.com/json-schemas/spfx/client-side-web-part-manifest.schema.json", Data does not match any schemas from 'oneOf' Not sure why that's happening |
Can you show your package.json? From what I can see, running the 2016 project, there is no "write-manifests" task listed when I run gulp serve. |
This is my package.json: { I changed the web part to reference the property pane stuff back to sp-webpart-base import { 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 |
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. |
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:
ERROR 2:
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. |
Thanks. |
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. [SPLoaderError.loadComponentError]: ***INNERERROR:***Manifest not found for component id "0d910c1c-13b9-4e1c-9aa4-b008c5e42d7d" and version "16.7.0". SharePoint 2019. |
You are trying to use a newer version of React than is supported in 2019. You should be on React 15. Can you try updating your package.json to use
|
Closing issue as "answered". If you encounter similar issue(s), please open up a NEW issue. Thank you. |
Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues |
Category
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.
Observed Behavior
After installing @microsoft/sharepoint yoeman generator, by running
yo @microsoft/sharepoint
and giving required answers to the prompts for setting up a sample 2016 onprem sharepoint project with react, a project is created with few warnings and following message :After running
gulp trust-dev-cert
,I ran
gulp serve
, at this time the command execution is initiated and suddenly stopped with few errors.Steps to Reproduce
Request :
Kindly please share steps to setup SP2016 onprem with React, without errors.
The text was updated successfully, but these errors were encountered: