Gulp Build not working on react-calendar #5209
Labels
sample: react-calendar
Stale
status:wrong-author
type:bug-suspected
Suspected bug (not working as designed/expected). See type:bug-confirmed for confirmed bugs
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: