-
Notifications
You must be signed in to change notification settings - Fork 18
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
2.0 brings npm i
issues (node-gyp) to my Mac
#64
Comments
npm i
issues (node-gyp) to my Mac
same issue also on windows npm error code 1 |
oh yea. I noticed this too when using npm. For some reason it only happens with that package manager. When using yarn or pnpm everything runs smoothly. I havent really looked into it because i'd rather use yarn or pnpm anyway. There's definitely some issue in the underlying dependency. |
Also happens inside devcontainer on linux:
Node v22.12.0 (npm v10.9.0) Container base image:
Installed devcontainer features
package.json
|
I can initialize a clean app just fine. However, attempting to run
npm i
fails with node-gyp errors.Specifically, when
npm i
gets towasm-sjlj
I get node-gyp build errors.My failed attempt to debug
I believe python3 is dubiously usable with node-gyp because of the potential need for 2.7 dependencies. I admit I'm not overly well versed in that though. Attempting to investigate this, I made use of python 2.7.18 via mise (my version control tool of choice). I confirmed the path is fine in the context of my workspace with
which python
reporting 2.7.18 in the expected directory. However, runningnpm i
continues to reportI went on to set
NODE_GYP_FORCE_PYTHON
to the location of 2.7.18 to no avail.I don't get any of this on 1.4, I just see warnings about nx 18 being the highest supported level.
What it seems like
It seems to me like a difference between the dependencies in 1.4 and 2.0 are a bit more flakey with respect to node-gyp and respecting the path.
More comprehensive logs
npx create-nx-workspace --preset=@monodon/rust
Need to install the following packages:
[email protected]
Ok to proceed? (y)
NX Let's create a new workspace [https://nx.dev/getting-started/intro]
✔ Where would you like to create your workspace? · org
✔ Which CI provider would you like to use? · skip
✔ Would you like remote caching to make your build faster? · skip
NX Creating your v20.0.5 workspace.
✔ Installing dependencies with npm
✔ Successfully created the workspace: org.
NX Nx CLI is not installed globally.
This means that you will have to use "npx nx" to execute commands in the workspace.
Run "npm i -g nx" to be able to execute command directly.
NX Successfully applied preset: @monodon/rust
~/Projects/monodon-debug
❯ : cd org/
org on main
❯ : npm i
npm error code 1
npm error path /Users/ryan/Projects/monodon-debug/org/node_modules/wasm-sjlj
npm error command failed
npm error command sh -c node-gyp rebuild
npm error gyp info it worked if it ends with ok
npm error gyp info using [email protected]
npm error gyp info using [email protected] | darwin | arm64
npm error gyp info find Python using Python version 3.13.0 found at "/Users/ryan/.local/share/mise/installs/python/3.13.0/bin/python3"
npm error gyp info spawn /Users/ryan/.local/share/mise/installs/python/3.13.0/bin/python3
npm error gyp info spawn args [
npm error gyp info spawn args '/Users/ryan/.local/share/mise/installs/node/20.18.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm error gyp info spawn args 'binding.gyp',
npm error gyp info spawn args '-f',
npm error gyp info spawn args 'make',
npm error gyp info spawn args '-I',
npm error gyp info spawn args '/Users/ryan/Projects/monodon-debug/org/node_modules/wasm-sjlj/build/config.gypi',
npm error gyp info spawn args '-I',
npm error gyp info spawn args '/Users/ryan/.local/share/mise/installs/node/20.18.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm error gyp info spawn args '-I',
npm error gyp info spawn args '/Users/ryan/Library/Caches/node-gyp/20.18.0/include/node/common.gypi',
npm error gyp info spawn args '-Dlibrary=shared_library',
npm error gyp info spawn args '-Dvisibility=default',
npm error gyp info spawn args '-Dnode_root_dir=/Users/ryan/Library/Caches/node-gyp/20.18.0',
npm error gyp info spawn args '-Dnode_gyp_dir=/Users/ryan/.local/share/mise/installs/node/20.18.0/lib/node_modules/npm/node_modules/node-gyp',
npm error gyp info spawn args '-Dnode_lib_file=/Users/ryan/Library/Caches/node-gyp/20.18.0/<(target_arch)/node.lib',
npm error gyp info spawn args '-Dmodule_root_dir=/Users/ryan/Projects/monodon-debug/org/node_modules/wasm-sjlj',
npm error gyp info spawn args '-Dnode_engine=v8',
npm error gyp info spawn args '--depth=.',
npm error gyp info spawn args '--no-parallel',
npm error gyp info spawn args '--generator-output',
npm error gyp info spawn args 'build',
npm error gyp info spawn args '-Goutput_dir=.'
npm error gyp info spawn args ]
npm error gyp: binding.gyp not found (cwd: /Users/ryan/Projects/monodon-debug/org/node_modules/wasm-sjlj) while trying to load binding.gyp
npm error gyp ERR! configure error
npm error gyp ERR! stack Error:
gyp
failed with exit code: 1npm error gyp ERR! stack at ChildProcess. (/Users/ryan/.local/share/mise/installs/node/20.18.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:297:18)
npm error gyp ERR! stack at ChildProcess.emit (node:events:519:28)
npm error gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:294:12)
npm error gyp ERR! System Darwin 23.6.0
npm error gyp ERR! command "/Users/ryan/.local/share/mise/installs/node/20.18.0/bin/node" "/Users/ryan/.local/share/mise/installs/node/20.18.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm error gyp ERR! cwd /Users/ryan/Projects/monodon-debug/org/node_modules/wasm-sjlj
npm error gyp ERR! node -v v20.18.0
npm error gyp ERR! node-gyp -v v10.1.0
npm error gyp ERR! not ok
npm error A complete log of this run can be found in: /Users/ryan/.npm/_logs/2024-10-24T15_51_51_525Z-debug-0.log
org on main
❯ : which python
╭───┬─────────┬─────────────────────────────────────────────────────────────────┬──────────╮
│ # │ command │ path │ type │
├───┼─────────┼─────────────────────────────────────────────────────────────────┼──────────┤
│ 0 │ python │ /Users/ryan/.local/share/mise/installs/python/3.13.0/bin/python │ external │
╰───┴─────────┴─────────────────────────────────────────────────────────────────┴──────────╯
org on main
❯ : mise use [email protected]
mise ~/Projects/monodon-debug/org/.mise.toml tools: [email protected]
org on main
❯ : which python
╭───┬─────────┬─────────────────────────────────────────────────────────────────┬──────────╮
│ # │ command │ path │ type │
├───┼─────────┼─────────────────────────────────────────────────────────────────┼──────────┤
│ 0 │ python │ /Users/ryan/.local/share/mise/installs/python/2.7.18/bin/python │ external │
╰───┴─────────┴─────────────────────────────────────────────────────────────────┴──────────╯
org on main
❯ : npm i
npm error code 1
npm error path /Users/ryan/Projects/monodon-debug/org/node_modules/wasm-sjlj
npm error command failed
npm error command sh -c node-gyp rebuild
npm error gyp info it worked if it ends with ok
npm error gyp info using [email protected]
npm error gyp info using [email protected] | darwin | arm64
npm error gyp info find Python using Python version 3.11.6 found at "/usr/local/bin/python3"
npm error gyp info spawn /usr/local/bin/python3
npm error gyp info spawn args [
npm error gyp info spawn args '/Users/ryan/.local/share/mise/installs/node/20.18.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm error gyp info spawn args 'binding.gyp',
npm error gyp info spawn args '-f',
npm error gyp info spawn args 'make',
npm error gyp info spawn args '-I',
npm error gyp info spawn args '/Users/ryan/Projects/monodon-debug/org/node_modules/wasm-sjlj/build/config.gypi',
npm error gyp info spawn args '-I',
npm error gyp info spawn args '/Users/ryan/.local/share/mise/installs/node/20.18.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm error gyp info spawn args '-I',
npm error gyp info spawn args '/Users/ryan/Library/Caches/node-gyp/20.18.0/include/node/common.gypi',
npm error gyp info spawn args '-Dlibrary=shared_library',
npm error gyp info spawn args '-Dvisibility=default',
npm error gyp info spawn args '-Dnode_root_dir=/Users/ryan/Library/Caches/node-gyp/20.18.0',
npm error gyp info spawn args '-Dnode_gyp_dir=/Users/ryan/.local/share/mise/installs/node/20.18.0/lib/node_modules/npm/node_modules/node-gyp',
npm error gyp info spawn args '-Dnode_lib_file=/Users/ryan/Library/Caches/node-gyp/20.18.0/<(target_arch)/node.lib',
npm error gyp info spawn args '-Dmodule_root_dir=/Users/ryan/Projects/monodon-debug/org/node_modules/wasm-sjlj',
npm error gyp info spawn args '-Dnode_engine=v8',
npm error gyp info spawn args '--depth=.',
npm error gyp info spawn args '--no-parallel',
npm error gyp info spawn args '--generator-output',
npm error gyp info spawn args 'build',
npm error gyp info spawn args '-Goutput_dir=.'
npm error gyp info spawn args ]
npm error gyp: binding.gyp not found (cwd: /Users/ryan/Projects/monodon-debug/org/node_modules/wasm-sjlj) while trying to load binding.gyp
npm error gyp ERR! configure error
npm error gyp ERR! stack Error:
gyp
failed with exit code: 1npm error gyp ERR! stack at ChildProcess. (/Users/ryan/.local/share/mise/installs/node/20.18.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:297:18)
npm error gyp ERR! stack at ChildProcess.emit (node:events:519:28)
npm error gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:294:12)
npm error gyp ERR! System Darwin 23.6.0
npm error gyp ERR! command "/Users/ryan/.local/share/mise/installs/node/20.18.0/bin/node" "/Users/ryan/.local/share/mise/installs/node/20.18.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm error gyp ERR! cwd /Users/ryan/Projects/monodon-debug/org/node_modules/wasm-sjlj
npm error gyp ERR! node -v v20.18.0
npm error gyp ERR! node-gyp -v v10.1.0
npm error gyp ERR! not ok
npm error A complete log of this run can be found in: /Users/ryan/.npm/_logs/2024-10-24T15_54_05_732Z-debug-0.log
The text was updated successfully, but these errors were encountered: