-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
react-script-editor-onprem - gulp serve throws Unexpected reserved word error #4688
Comments
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible. |
@wobba Do you feel any version of the toolchain may cause this problem? If yes, can you please confirm what should be the exact versions to use? |
Haven't done any on-prem building with SPFx in years, so not sure how best to solve it. You could always spin up a new project and copy over the code. |
I will try it out this weekend. Thanks! |
I'm running in the same issue. @Akshay-Integrano have you found a solution? |
And I want to bring the elephant into the room. Why do you need the web part? Just create a SPFx web part with the actual JavaScript code. |
@fschmidteu, No. I wasn't able to make it work with a fresh solution and then porting code to it. Because it seemed like some of its code was also needed to be updated due to updated dependencies. Stakeholders wanted a quick solution then, so we had to drop it. |
Couldn't kill the elephant, this was the easy way. Thanks. |
Disclaimer
Yes
Sample
react-script-editor-onprem
Contributor(s)
@wobba
What happened?
I see an error message when I try gulp serve. The message is as follows:
c:\spfx1\react-script-editor-onprem\node_modules@microsoft\spfx-heft-plugins\lib\plugins\devDeployPlugin\SpDevDeploy.js:165
for await (const file of filesIterable) {
^^^^^
SyntaxError: Unexpected reserved word
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:617:28)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at Object. (c:\spfx1\react-script-editor-onprem\node_modules@microsoft\spfx-heft-plugins\lib\plugins\devDeployPlugin\DevDeployPlugin.js:28:23)
Steps to reproduce
Expected behavior
gulp serve should not throw any error and the browser window should open workbench to test the web part.
Target SharePoint environment
SharePoint Server 2019 (on-premise)
Developer environment
Windows
Browsers
What version of Node.js is currently installed on your workstation?
v8.17.0
What version of Node.js is required by the sample?
v8 or v6
Paste the results of SPFx doctor
I get following error when I run spfx doctor commands - even the m365 version throws the following error:
Additional environment details
SharePoint Framework v1.4.1
Node v8.17.0
yo v3.1.0
gulp-cli v2.3.0
The text was updated successfully, but these errors were encountered: