nodejs / node-gyp

Node.js native addon build tool
MIT License
9.88k stars 1.79k forks source link

Node Upgrade 16->20 #2934

Closed Dhiren321 closed 5 months ago

Dhiren321 commented 11 months ago

if i run npm run build:dev i get below output

C:\Project3\VSENode20Upgrade\VSE_AppDashBoard>npm run build:dev

webapp@0.1.0 build:dev node build.before.js --mode=development && node ./node_modules/webpack/bin/webpack.js --config webpack.config.vendor.js && node ./node_modules/webpack/bin/webpack.js --config webpack.config.js

node:internal/modules/cjs/loader:1051 throw err; ^

Error: Cannot find module 'rimraf' Require stack:

Node.js v20.9.0

for this if i try to run npm i rimraf --force i get below output

C:\Project3\VSENode20Upgrade\VSE_AppDashBoard>npm cache clean --force npm WARN using --force Recommended protections disabled.

C:\Project3\VSENode20Upgrade\VSE_AppDashBoard>npm i rimraf --force npm WARN using --force Recommended protections disabled. npm WARN deprecated stable@0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility npm WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies npm WARN deprecated querystring@0.2.1: The querystring API is considered Legacy. new code should use the URLSearchParams API instead. npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated npm WARN deprecated mini-create-react-context@0.3.3: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. npm WARN deprecated @types/anymatch@3.0.0: This is a stub types definition. anymatch provides its own type definitions, so you do not need this installed. npm WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies npm WARN deprecated redux-devtools-extension@2.13.9: Package moved to @redux-devtools/extension. npm WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies npm WARN deprecated @babel/polyfill@7.7.0: 🚨 This package has been deprecated in favor of separate inclusion of a polyfill and regenerator-runtime (when needed). See the @babel/polyfill docs (https://babeljs.io/docs/en/babel-polyfill) for more information. npm WARN deprecated svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x. npm WARN deprecated popper.js@1.16.1: You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1 npm WARN deprecated popper.js@1.16.1: You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1 npm WARN deprecated popper.js@1.16.1: You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1 npm WARN deprecated @material-ui/styles@4.11.5: Material UI v4 doesn't receive active development since September 2021. See the guide https://mui.com/material-ui/migration/migration-v4/ to upgrade to v5. npm WARN deprecated core-js@2.6.12: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js. npm WARN deprecated @material-ui/core@4.12.4: Material UI v4 doesn't receive active development since September 2021. See the guide https://mui.com/material-ui/migration/migration-v4/ to upgrade to v5. npm WARN cleanup Failed to remove some directories [ npm WARN cleanup [ npm WARN cleanup 'C:\Project3\VSENode20Upgrade\VSE_AppDashBoard\node_modules\postcss-svgo', npm WARN cleanup [Error: EPERM: operation not permitted, rmdir 'C:\Project3\VSENode20Upgrade\VSE_AppDashBoard\node_modules\postcss-svgo\node_modules\csso\node_modules\css-tree\lib\syntax\pseudo'] { npm WARN cleanup errno: -4048, npm WARN cleanup code: 'EPERM', npm WARN cleanup syscall: 'rmdir', npm WARN cleanup path: 'C:\Project3\VSENode20Upgrade\VSE_AppDashBoard\node_modules\postcss-svgo\node_modules\csso\node_modules\css-tree\lib\syntax\pseudo' npm WARN cleanup } npm WARN cleanup ], npm WARN cleanup [ npm WARN cleanup 'C:\Project3\VSENode20Upgrade\VSE_AppDashBoard\node_modules\@babel\polyfill', npm WARN cleanup [Error: EPERM: operation not permitted, rmdir 'C:\Project3\VSENode20Upgrade\VSE_AppDashBoard\node_modules\@babel\polyfill\node_modules\core-js\library\fn'] { npm WARN cleanup errno: -4048, npm WARN cleanup code: 'EPERM', npm WARN cleanup syscall: 'rmdir', npm WARN cleanup path: 'C:\Project3\VSENode20Upgrade\VSE_AppDashBoard\node_modules\@babel\polyfill\node_modules\core-js\library\fn' npm WARN cleanup } npm WARN cleanup ] npm WARN cleanup ] npm ERR! code 1 npm ERR! path C:\Project3\VSENode20Upgrade\VSE_AppDashBoard\node_modules\fibers npm ERR! command failed npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node build.js || nodejs build.js npm ERR! node:internal/modules/cjs/loader:1051 npm ERR! throw err; npm ERR! ^ npm ERR! npm ERR! Error: Cannot find module 'C:\Project3\VSENode20Upgrade\VSE_AppDashBoard\node_modules\node-gyp\bin\node-gyp.js' npm ERR! at Module._resolveFilename (node:internal/modules/cjs/loader:1048:15) npm ERR! at Module._load (node:internal/modules/cjs/loader:901:27) npm ERR! at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12) npm ERR! at node:internal/main/run_main_module:23:47 { npm ERR! code: 'MODULE_NOT_FOUND', npm ERR! requireStack: [] npm ERR! } npm ERR! npm ERR! Node.js v20.9.0 npm ERR! node-gyp exited with code: 1 npm ERR! Please make sure you are using a supported platform and node version. If you npm ERR! would like to compile fibers on this machine please make sure you have setup your npm ERR! build environment-- npm ERR! Windows + OS X instructions here: https://github.com/nodejs/node-gyp npm ERR! Ubuntu users please run: sudo apt-get install g++ build-essential npm ERR! RHEL users please run: yum install gcc-c++ and yum groupinstall 'Development Tools' npm ERR! Alpine users please run: sudo apk add python make g++ npm ERR! 'nodejs' is not recognized as an internal or external command, npm ERR! operable program or batch file.

its round robin if it try to install missing module it get back to start giving error any way out of this to have a clean successful run

cclauss commented 11 months ago

Perhaps open an issue on https://github.com/isaacs/rimraf because their GitHub Actions on Windows fail. @isaacs

StefanStojanovic commented 5 months ago

This issue seems relevant to rimraf, and not node-gyp. If there are no objections, I will close this issue next Mon-Tue. In case something similar happens again please open a new issue.

cclauss commented 5 months ago

This issue seems relevant to rimraf, and not node-gyp.

Agreed. https://github.com/isaacs/rimraf/blob/main/README.md