-
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
Gulp Build not working on react-calendar #5209
Comments
Wrong or missing contributor @mentionsThank you for your submission, but you appear to have forgotten to @mention the sample author(s). To help increase your chances of getting assistance from the original authors of the sample, you should make sure to @mention the actual authors (and not the repository maintainers). Make sure to include the Please note that the sample authors will not get notified about this issue unless you update this issue accordingly. You can find the author(s) of each sample in the sample's We'll automatically close this issue in 7 days unless you update the issue. For more information on how to create a good issue, refer to our wiki for more information: How to Create Good Issues |
Please note that this issue will be closed within 24 hours because it has been flagged as having invalid authors. Read the guidance and @mention the authors so they can respond to you. |
Closing this issue due to lack of response. Feel free to open a new issue, but make sure to follow the guidance on how to create good issues and @mention the authors so they can respond to you. |
@SharePointPro - I'm having the exact same issue you've described here with the react-calendar sample. |
No, I did't find a solution. |
Hi @SharePointPro and @TracyGH, I have the same issue here because of another module. I'm still trying to find a way... I'll let you know if I ever achieve a miracle |
UPDATE That's mean you need to change the version of node.js. again. I use this one :
|
Disclaimer
Yes
Sample
https://github.com/pnp/sp-dev-fx-webparts/tree/main/samples/react-calendar
Contributor(s)
Hugo Bernier Peter Paul Kirschner
What happened?
When using the recommended node version 12.13.0 (64 bit), and running NPM install from a clean clone, the error
code: 'MODULE_NOT_FOUND',
occurs when running gulp build
Full Error:
`PS C:\sppro2\Libraries\react-calendar> gulp build --ship
Error: Cannot find module 'node:process'
Require stack:
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:794:15)
at Function.Module._load (internal/modules/cjs/loader.js:687:27)
at Module.require (internal/modules/cjs/loader.js:849:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.497742 (C:\sppro2\Libraries\react-calendar\node_modules@microsoft\spfx-heft-plugins\node_modules@microsoft\rush-lib\dist\rush-lib.js:494:18)
at webpack_require (C:\sppro2\Libraries\react-calendar\node_modules@microsoft\spfx-heft-plugins\node_modules@microsoft\rush-lib\dist\rush-lib.js:595:41)
at Object.574471 (C:\sppro2\Libraries\react-calendar\node_modules@microsoft\spfx-heft-plugins\node_modules@microsoft\rush-lib\dist\commons.js:16917:70)
at webpack_require (C:\sppro2\Libraries\react-calendar\node_modules@microsoft\spfx-heft-plugins\node_modules@microsoft\rush-lib\dist\rush-lib.js:595:41)
at Object.541976 (C:\sppro2\Libraries\react-calendar\node_modules@microsoft\spfx-heft-plugins\node_modules@microsoft\rush-lib\dist\commons.js:247:88)
at webpack_require (C:\sppro2\Libraries\react-calendar\node_modules@microsoft\spfx-heft-plugins\node_modules@microsoft\rush-lib\dist\rush-lib.js:595:41) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'C:\sppro2\Libraries\react-calendar\node_modules\@microsoft\spfx-heft-plugins\node_modules\@microsoft\rush-lib\dist\rush-lib.js',
'C:\sppro2\Libraries\react-calendar\node_modules\@microsoft\spfx-heft-plugins\node_modules\@microsoft\rush-lib\lib\index.js',
'C:\sppro2\Libraries\react-calendar\node_modules\@microsoft\spfx-heft-plugins\lib\plugins\devDeployPlugin\SpDevDeploy.js',
'C:\sppro2\Libraries\react-calendar\node_modules\@microsoft\spfx-heft-plugins\lib\index.js',
'C:\sppro2\Libraries\react-calendar\node_modules\@microsoft\sp-build-core-tasks\lib\webpack\ConfigureWebpackTask.js',
'C:\sppro2\Libraries\react-calendar\node_modules\@microsoft\sp-build-core-tasks\lib\index.js',
'C:\sppro2\Libraries\react-calendar\node_modules\@microsoft\sp-build-web\lib\index.js',
'C:\sppro2\Libraries\react-calendar\gulpfile.js',
'C:\Users\tipha\AppData\Roaming\npm\node_modules\gulp\node_modules\gulp-cli\lib\shared\require-or-import.js',
'C:\Users\tipha\AppData\Roaming\npm\node_modules\gulp\node_modules\gulp-cli\lib\versioned\^4.0.0\index.js',
'C:\Users\tipha\AppData\Roaming\npm\node_modules\gulp\node_modules\gulp-cli\index.js',
'C:\Users\tipha\AppData\Roaming\npm\node_modules\gulp\bin\gulp.js'
]
}`
Steps to reproduce
Expected behavior
The app to build correctl;y
Target SharePoint environment
SharePoint Online
Developer environment
Windows
Browsers
What version of Node.js is currently installed on your workstation?
12.13.0
What version of Node.js is required by the sample?
12.13.0
Paste the results of SPFx doctor
C:\Users\tipha\AppData\Roaming\nvm\v12.13.0\node_modules@pnp\cli-microsoft365\dist\index.js:2
import { cli } from './cli/cli.js';
^^^^^^
SyntaxError: Cannot use import statement outside a module
at Module._compile (internal/modules/cjs/loader.js:892:18)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:973:10)
at Module.load (internal/modules/cjs/loader.js:812:32)
at Function.Module._load (internal/modules/cjs/loader.js:724:14)
at Function.Module.runMain (internal/modules/cjs/loader.js:1025:10)
at internal/main/run_main_module.js:17:11
Additional environment details
I have also tried on node 13, 14, 10,
The text was updated successfully, but these errors were encountered: