Closed
Description
Issue Description
I am trying to update to NodeJS 20
on macOS Sonoma 14.3 I have a NodeJS installation managed with nvm
rm -rf ~/.npm/_cacache/; nvm install 20.11.0; nvm use 20.11.0; npm i -g npm@10.4.0; npm i -g nativescript
results in
Now using node v20.11.0 (npm v10.3.0)
removed 13 packages, and changed 28 packages in 905ms
24 packages are looking for funding
run `npm fund` for details
npm WARN deprecated formidable@1.2.6: Please upgrade to latest, formidable@v2 or formidable@v3! Check these notes: https://bit.ly/2ZEqIau
npm ERR! code 1
npm ERR! path /Users/adriann/.nvm/versions/node/v20.11.0/lib/node_modules/nativescript/node_modules/fsevents
npm ERR! command failed
npm ERR! command sh -c node-gyp rebuild
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@10.0.1
npm ERR! gyp info using node@20.11.0 | darwin | arm64
npm ERR! gyp info find Python using Python version 3.11.7 found at "/opt/homebrew/opt/python@3.11/bin/python3.11"
npm ERR! gyp info spawn /opt/homebrew/opt/python@3.11/bin/python3.11
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '/Users/adriann/.nvm/versions/node/v20.11.0/lib/node_modules/nativescript/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'make',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/Users/adriann/.nvm/versions/node/v20.11.0/lib/node_modules/nativescript/node_modules/fsevents/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/Users/adriann/.nvm/versions/node/v20.11.0/lib/node_modules/nativescript/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/Users/adriann/Library/Caches/node-gyp/20.11.0/include/node/common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=/Users/adriann/Library/Caches/node-gyp/20.11.0',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/Users/adriann/.nvm/versions/node/v20.11.0/lib/node_modules/nativescript/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/Users/adriann/Library/Caches/node-gyp/20.11.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/Users/adriann/.nvm/versions/node/v20.11.0/lib/node_modules/nativescript/node_modules/fsevents',
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp: binding.gyp not found (cwd: /Users/adriann/.nvm/versions/node/v20.11.0/lib/node_modules/nativescript/node_modules/fsevents) while trying to load binding.gyp
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: `gyp` failed with exit code: 1
npm ERR! gyp ERR! stack at ChildProcess.<anonymous> (/Users/adriann/.nvm/versions/node/v20.11.0/lib/node_modules/nativescript/node_modules/node-gyp/lib/configure.js:271:18)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:518:28)
npm ERR! gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:294:12)
npm ERR! gyp ERR! System Darwin 23.3.0
npm ERR! gyp ERR! command "/Users/adriann/.nvm/versions/node/v20.11.0/bin/node" "/Users/adriann/.nvm/versions/node/v20.11.0/lib/node_modules/nativescript/node_modules/.bin/node-gyp" "rebuild"
npm ERR! gyp ERR! cwd /Users/adriann/.nvm/versions/node/v20.11.0/lib/node_modules/nativescript/node_modules/fsevents
npm ERR! gyp ERR! node -v v20.11.0
npm ERR! gyp ERR! node-gyp -v v10.0.1
npm ERR! gyp ERR! not ok
npm ERR! A complete log of this run can be found in: /Users/adriann/.npm/_logs/2024-02-05T17_46_50_035Z-debug-0.log
Note that the same works on npm 10.2.4
(which comes out-of-the-box with NodeJS 20.11.0) and also works on npm 10.3.0
, so it's something isolated to (or starting from) npm version 10.3.4
Reproduction
No response
Relevant log output (if applicable)
4118 timing build:link Completed in 47ms
4119 info run fsevents@2.3.3 install node_modules/nativescript/node_modules/fsevents node-gyp rebuild
4120 info run fsevents@2.3.3 install { code: 1, signal: null }
4121 timing reify:rollback:createSparse Completed in 716ms
4122 timing reify:rollback:retireShallow Completed in 1ms
4123 timing command:i Completed in 14983ms
4124 verbose stack Error: command failed
4124 verbose stack at ChildProcess.<anonymous> (/Users/adriann/.nvm/versions/node/v20.11.0/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/lib/index.js:53:27)
4124 verbose stack at ChildProcess.emit (node:events:518:28)
4124 verbose stack at maybeClose (node:internal/child_process:1105:16)
4124 verbose stack at ChildProcess._handle.onexit (node:internal/child_process:305:5)
4125 verbose pkgid fsevents@2.3.3
4126 verbose cwd /Users/adriann/Developer/MobileHM/unfence.moblib.device
4127 verbose Darwin 23.3.0
4128 verbose node v20.11.0
4129 verbose npm v10.4.0
4130 error code 1
4131 error path /Users/adriann/.nvm/versions/node/v20.11.0/lib/node_modules/nativescript/node_modules/fsevents
4132 error command failed
4133 error command sh -c node-gyp rebuild
4134 error gyp info it worked if it ends with ok
4134 error gyp info using node-gyp@10.0.1
4134 error gyp info using node@20.11.0 | darwin | arm64
4134 error gyp info find Python using Python version 3.11.7 found at "/opt/homebrew/opt/python@3.11/bin/python3.11"
4134 error gyp info spawn /opt/homebrew/opt/python@3.11/bin/python3.11
4134 error gyp info spawn args [
4134 error gyp info spawn args '/Users/adriann/.nvm/versions/node/v20.11.0/lib/node_modules/nativescript/node_modules/node-gyp/gyp/gyp_main.py',
4134 error gyp info spawn args 'binding.gyp',
4134 error gyp info spawn args '-f',
4134 error gyp info spawn args 'make',
4134 error gyp info spawn args '-I',
4134 error gyp info spawn args '/Users/adriann/.nvm/versions/node/v20.11.0/lib/node_modules/nativescript/node_modules/fsevents/build/config.gypi',
4134 error gyp info spawn args '-I',
4134 error gyp info spawn args '/Users/adriann/.nvm/versions/node/v20.11.0/lib/node_modules/nativescript/node_modules/node-gyp/addon.gypi',
4134 error gyp info spawn args '-I',
4134 error gyp info spawn args '/Users/adriann/Library/Caches/node-gyp/20.11.0/include/node/common.gypi',
4134 error gyp info spawn args '-Dlibrary=shared_library',
4134 error gyp info spawn args '-Dvisibility=default',
4134 error gyp info spawn args '-Dnode_root_dir=/Users/adriann/Library/Caches/node-gyp/20.11.0',
4134 error gyp info spawn args '-Dnode_gyp_dir=/Users/adriann/.nvm/versions/node/v20.11.0/lib/node_modules/nativescript/node_modules/node-gyp',
4134 error gyp info spawn args '-Dnode_lib_file=/Users/adriann/Library/Caches/node-gyp/20.11.0/<(target_arch)/node.lib',
4134 error gyp info spawn args '-Dmodule_root_dir=/Users/adriann/.nvm/versions/node/v20.11.0/lib/node_modules/nativescript/node_modules/fsevents',
4134 error gyp info spawn args '-Dnode_engine=v8',
4134 error gyp info spawn args '--depth=.',
4134 error gyp info spawn args '--no-parallel',
4134 error gyp info spawn args '--generator-output',
4134 error gyp info spawn args 'build',
4134 error gyp info spawn args '-Goutput_dir=.'
4134 error gyp info spawn args ]
4134 error gyp: binding.gyp not found (cwd: /Users/adriann/.nvm/versions/node/v20.11.0/lib/node_modules/nativescript/node_modules/fsevents) while trying to load binding.gyp
4134 error gyp ERR! configure error
4134 error gyp ERR! stack Error: `gyp` failed with exit code: 1
4134 error gyp ERR! stack at ChildProcess.<anonymous> (/Users/adriann/.nvm/versions/node/v20.11.0/lib/node_modules/nativescript/node_modules/node-gyp/lib/configure.js:271:18)
4134 error gyp ERR! stack at ChildProcess.emit (node:events:518:28)
4134 error gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:294:12)
4134 error gyp ERR! System Darwin 23.3.0
4134 error gyp ERR! command "/Users/adriann/.nvm/versions/node/v20.11.0/bin/node" "/Users/adriann/.nvm/versions/node/v20.11.0/lib/node_modules/nativescript/node_modules/.bin/node-gyp" "rebuild"
4134 error gyp ERR! cwd /Users/adriann/.nvm/versions/node/v20.11.0/lib/node_modules/nativescript/node_modules/fsevents
4134 error gyp ERR! node -v v20.11.0
4134 error gyp ERR! node-gyp -v v10.0.1
4134 error gyp ERR! not ok
4135 verbose exit 1
4136 timing npm Completed in 15066ms
4137 verbose unfinished npm timer reify 1707155210120
4138 verbose unfinished npm timer reify:build 1707155224080
4139 verbose unfinished npm timer build 1707155224081
4140 verbose unfinished npm timer build:deps 1707155224081
4141 verbose unfinished npm timer build:run:install 1707155224138
4142 verbose unfinished npm timer build:run:install:node_modules/nativescript/node_modules/fsevents 1707155224138
4143 verbose code 1
4144 error A complete log of this run can be found in: /Users/adriann/.npm/_logs/2024-02-05T17_46_50_035Z-debug-0.log
Environment
OS: macOS 14.3
CPU: (12) arm64 Apple M2 Pro
Shell: /bin/bash
node: 20.11.0
npm: 10.4.0
nativescript: 8.6.5
# android
java: 17.0.7
ndk: Not Found
apis: 33, 34
build_tools: 34.0.0
system_images:
- android-28 | Google ARM64-V8a Play ARM 64 v8a
- android-29 | Google Play ARM 64 v8a
- android-30 | Google APIs ARM 64 v8a
- android-30 | Google Play ARM 64 v8a
- android-33 | Google APIs ARM 64 v8a
- android-33 | Google Play ARM 64 v8a
- android-34-ext8 | Google Play ARM 64 v8a
- android-34 | Google APIs ARM 64 v8a
- android-34 | Google Play ARM 64 v8a
# ios
xcode: 15.2/15C500b
cocoapods: 1.15.0
python: 3.11.7
python3: 3.11.7
ruby: 3.3.0
platforms:
- DriverKit 23.2
- iOS 17.2
- macOS 14.2
- tvOS 17.2
- visionOS 1.0
- watchOS 10.2
Dependencies
"dependencies": {},
"devDependencies": {}
Please accept these terms
- I have searched the existing issues as well as StackOverflow and this has not been posted before
- This is a bug report
- I agree to follow this project's Code of Conduct