Skip to content
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

[Need help] Error when running npm i #259

Open
shanlipro opened this issue Feb 15, 2023 · 3 comments · May be fixed by #267
Open

[Need help] Error when running npm i #259

shanlipro opened this issue Feb 15, 2023 · 3 comments · May be fixed by #267

Comments

@shanlipro
Copy link

as ^^, seems I didn't get to start a node locally, it's said that Build failed with error code: 1 on the debugging info printed in the terminal, I suspect something wrong with the path or are there any dependencies or version conflicts?

see details in pastein: https://pastebin.com/1xv5fzHv

@bonniesimon
Copy link

bonniesimon commented Feb 18, 2023

I've also got a similar error while trying to run npm i

yarn install v1.22.19
info No lockfile found.
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
[1/4] 🔍  Resolving packages...
warning [email protected]: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
warning babili-webpack-plugin > babel-core > babel-register > [email protected]: 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.
warning babili-webpack-plugin > babel-core > babel-runtime > [email protected]: 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.
warning babili-webpack-plugin > [email protected]: babili has been renamed to babel-minify. Please update to babel-preset-minify
warning copy-webpack-plugin > webpack-log > [email protected]: 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.
warning devtron > [email protected]: Support has ended for 9.x series. Upgrade to @latest
warning electron-builder > app-builder-lib > [email protected]: Please use @electron/osx-sign moving forward. Be aware the API is slightly different
warning electron-builder > app-builder-lib > @electron/universal > [email protected]: Please use @electron/asar moving forward.  There is no API change, just a package name change
warning [email protected]: This loader has been deprecated. Please use eslint-webpack-plugin
warning [email protected]: 3.x is no longer supported
warning node-sass > node-gyp > [email protected]: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
warning node-sass > [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
warning node-sass > node-gyp > [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
warning node-sass > request > [email protected]: 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.
warning node-sass > request > [email protected]: this library is no longer supported
warning webpack > watchpack > watchpack-chokidar2 > [email protected]: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
warning webpack > micromatch > snapdragon > [email protected]: See https://github.com/lydell/source-map-resolve#deprecated
warning webpack > node-libs-browser > url > [email protected]: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
warning webpack > watchpack > watchpack-chokidar2 > chokidar > [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
warning webpack > micromatch > snapdragon > source-map-resolve > [email protected]: See https://github.com/lydell/source-map-url#deprecated
warning webpack > micromatch > snapdragon > source-map-resolve > [email protected]: Please see https://github.com/lydell/urix#deprecated
warning webpack > micromatch > snapdragon > source-map-resolve > [email protected]: https://github.com/lydell/resolve-url#deprecated
warning webpack-dev-server > [email protected]: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
warning " > [email protected]" has incorrect peer dependency "eslint@^5.0.0 || ^6.0.0".
[4/4] 🔨  Building fresh packages...
[1/5] ⠐ fsevents
[-/5] ⠐ waiting...
[-/5] ⠐ waiting...
[4/5] ⠐ electron
error /Users/bonstine/dev/indie/pomotroid/node_modules/node-sass: Command failed.
Exit code: 1
Command: node scripts/build.js
Arguments:
Directory: /Users/bonstine/dev/indie/pomotroid/node_modules/node-sass
Output:
Building: /Users/bonstine/.nvm/versions/node/v18.12.1/bin/node /Users/bonstine/dev/indie/pomotroid/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [
gyp verb cli   '/Users/bonstine/.nvm/versions/node/v18.12.1/bin/node',
gyp verb cli   '/Users/bonstine/dev/indie/pomotroid/node_modules/node-gyp/bin/node-gyp.js',
gyp verb cli   'rebuild',
gyp verb cli   '--verbose',
gyp verb cli   '--libsass_ext=',
gyp verb cli   '--libsass_cflags=',
gyp verb cli   '--libsass_ldflags=',
gyp verb cli   '--libsass_library='
gyp verb cli ]
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python3" in the PATH
gyp verb `which` succeeded python3 /usr/bin/python3
gyp ERR! configure error
gyp ERR! stack Error: Command failed: /usr/bin/python3 -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack   File "<string>", line 1
gyp ERR! stack     import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack                       ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack
gyp ERR! stack     at ChildProcess.exithandler (node:child_process:412:12)
gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
gyp ERR! stack     at maybeClose (node:internal/child_process:1091:16)
gyp ERR! stack     at Socket.<anonymous> (node:internal/child_process:449:11)
gyp ERR! stack     at Socket.emit (node:events:513:28)
gyp ERR! stack     at Pipe.<anonymous> (node:net:313:12)
gyp ERR! System Darwin 22.1.0
gyp ERR! command "/Users/bonstine/.nvm/versions/node/v18.12.1/bin/node" "/Users/bonstine/dev/indie/pomotroid/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /Users/bonstine/dev/indie/pomotroid/node_modules/node-sass
gyp ERR! node -v v18.12.1
gyp ERR! node-gyp -v v3.8.0

UPDATE:

I solved the issue by installing node v14. The problem was the the node-sass version in the repo was not compatible with node 15 or above. So had to downgrade node (I used nvm) to get it working. refer.

Hope this helps

@shanlipro
Copy link
Author

I've also got a similar error while trying to run npm i

yarn install v1.22.19
info No lockfile found.
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
[1/4] 🔍  Resolving packages...
warning [email protected]: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
warning babili-webpack-plugin > babel-core > babel-register > [email protected]: 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.
warning babili-webpack-plugin > babel-core > babel-runtime > [email protected]: 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.
warning babili-webpack-plugin > [email protected]: babili has been renamed to babel-minify. Please update to babel-preset-minify
warning copy-webpack-plugin > webpack-log > [email protected]: 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.
warning devtron > [email protected]: Support has ended for 9.x series. Upgrade to @latest
warning electron-builder > app-builder-lib > [email protected]: Please use @electron/osx-sign moving forward. Be aware the API is slightly different
warning electron-builder > app-builder-lib > @electron/universal > [email protected]: Please use @electron/asar moving forward.  There is no API change, just a package name change
warning [email protected]: This loader has been deprecated. Please use eslint-webpack-plugin
warning [email protected]: 3.x is no longer supported
warning node-sass > node-gyp > [email protected]: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
warning node-sass > [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
warning node-sass > node-gyp > [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
warning node-sass > request > [email protected]: 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.
warning node-sass > request > [email protected]: this library is no longer supported
warning webpack > watchpack > watchpack-chokidar2 > [email protected]: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
warning webpack > micromatch > snapdragon > [email protected]: See https://github.com/lydell/source-map-resolve#deprecated
warning webpack > node-libs-browser > url > [email protected]: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
warning webpack > watchpack > watchpack-chokidar2 > chokidar > [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
warning webpack > micromatch > snapdragon > source-map-resolve > [email protected]: See https://github.com/lydell/source-map-url#deprecated
warning webpack > micromatch > snapdragon > source-map-resolve > [email protected]: Please see https://github.com/lydell/urix#deprecated
warning webpack > micromatch > snapdragon > source-map-resolve > [email protected]: https://github.com/lydell/resolve-url#deprecated
warning webpack-dev-server > [email protected]: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
warning " > [email protected]" has incorrect peer dependency "eslint@^5.0.0 || ^6.0.0".
[4/4] 🔨  Building fresh packages...
[1/5] ⠐ fsevents
[-/5] ⠐ waiting...
[-/5] ⠐ waiting...
[4/5] ⠐ electron
error /Users/bonstine/dev/indie/pomotroid/node_modules/node-sass: Command failed.
Exit code: 1
Command: node scripts/build.js
Arguments:
Directory: /Users/bonstine/dev/indie/pomotroid/node_modules/node-sass
Output:
Building: /Users/bonstine/.nvm/versions/node/v18.12.1/bin/node /Users/bonstine/dev/indie/pomotroid/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [
gyp verb cli   '/Users/bonstine/.nvm/versions/node/v18.12.1/bin/node',
gyp verb cli   '/Users/bonstine/dev/indie/pomotroid/node_modules/node-gyp/bin/node-gyp.js',
gyp verb cli   'rebuild',
gyp verb cli   '--verbose',
gyp verb cli   '--libsass_ext=',
gyp verb cli   '--libsass_cflags=',
gyp verb cli   '--libsass_ldflags=',
gyp verb cli   '--libsass_library='
gyp verb cli ]
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python3" in the PATH
gyp verb `which` succeeded python3 /usr/bin/python3
gyp ERR! configure error
gyp ERR! stack Error: Command failed: /usr/bin/python3 -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack   File "<string>", line 1
gyp ERR! stack     import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack                       ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack
gyp ERR! stack     at ChildProcess.exithandler (node:child_process:412:12)
gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
gyp ERR! stack     at maybeClose (node:internal/child_process:1091:16)
gyp ERR! stack     at Socket.<anonymous> (node:internal/child_process:449:11)
gyp ERR! stack     at Socket.emit (node:events:513:28)
gyp ERR! stack     at Pipe.<anonymous> (node:net:313:12)
gyp ERR! System Darwin 22.1.0
gyp ERR! command "/Users/bonstine/.nvm/versions/node/v18.12.1/bin/node" "/Users/bonstine/dev/indie/pomotroid/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /Users/bonstine/dev/indie/pomotroid/node_modules/node-sass
gyp ERR! node -v v18.12.1
gyp ERR! node-gyp -v v3.8.0

UPDATE:

I solved the issue by installing node v14. The problem was the the node-sass version in the repo was not compatible with node 15 or above. So had to downgrade node (I used nvm) to get it working. refer.

Hope this helps

thanks, Bonnie, that helps. Actually shall we upgrade the node-sass version in the repository instead? is it preferred?

@bonniesimon
Copy link

Glad it worked.
About upgrading node-sass, I'm not sure of that. Maybe it would be better to upgrade the node-sass. But I think there are some side effects in doing that. Again, I'm not entirely sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants