Comments (18)
Same bug here on node 20.10.0 :
npm ERR! code 1
npm ERR! path /usr/local/lib/node_modules/nativescript/node_modules/fsevents
npm ERR! command failed
from nativescript-cli.
OS: macOS 14.4
CPU: (12) arm64 Apple M3 Pro
Shell: /bin/zsh
node: 21.6.2
npm: 10.2.4
nativescript: 8.6.6-next-02-23-2024-8019050415
# ios
xcode: 15.2/15C500b
cocoapods: 1.15.2
python: Not Found
python3: 3.9.6
ruby: 2.7.8
platforms:
- DriverKit 23.2
- iOS 17.2
- macOS 14.2
- tvOS 17.2
- visionOS 1.0
- watchOS 10.2
No issues on node 21.6.2 here. I have seen others having issues with fsevents
(some on Windows) but not really sure what causes it - as far as I understand fsevents
wouldn't even attempt to build on Windows machines because it's macos specific. We also don't directly depend on fsevents
either, plus it's marked optional so failing to build it shouldn't cause installation errors at all. I suspect it's either system env related, or an npm
bug perhaps?
npm why fsevents
[email protected] optional
node_modules/fsevents
optional fsevents@"~2.3.2" from [email protected]
node_modules/chokidar
chokidar@"3.5.3" from the root project
chokidar@"*" from @types/[email protected]
node_modules/@types/chokidar
dev @types/chokidar@"2.1.3" from the root project
chokidar@"3.5.3" from [email protected]
node_modules/mocha
dev mocha@"10.2.0" from the root project
chokidar@"^3.5.2" from [email protected]
node_modules/nodemon
from nativescript-cli.
I'm having the same problem of not being able to install on Ubuntu 22.04
Node: v20.11.1
npm: 10.5.0
Python: 3.12.2
NativeScript: 8.6.5
Error:
npm i -g nativescript npm WARN deprecated [email protected]: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. npm WARN deprecated [email protected]: Please upgrade to latest, formidable@v2 or formidable@v3! Check these notes: https://bit.ly/2ZEqIau npm ERR! code 1 npm ERR! path /home/gerson/.asdf/installs/nodejs/20.11.1/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 [email protected] npm ERR! gyp info using [email protected] | linux | x64 npm ERR! gyp info find Python using Python version 3.12.2 found at "/home/gerson/.asdf/installs/python/3.12.2/bin/python" npm ERR! gyp info spawn /home/gerson/.asdf/installs/python/3.12.2/bin/python npm ERR! gyp info spawn args [ npm ERR! gyp info spawn args '/home/gerson/.asdf/installs/nodejs/20.11.1/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 '/home/gerson/.asdf/installs/nodejs/20.11.1/lib/node_modules/nativescript/node_modules/fsevents/build/config.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/home/gerson/.asdf/installs/nodejs/20.11.1/lib/node_modules/nativescript/node_modules/node-gyp/addon.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/home/gerson/.cache/node-gyp/20.11.1/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=/home/gerson/.cache/node-gyp/20.11.1', npm ERR! gyp info spawn args '-Dnode_gyp_dir=/home/gerson/.asdf/installs/nodejs/20.11.1/lib/node_modules/nativescript/node_modules/node-gyp', npm ERR! gyp info spawn args '-Dnode_lib_file=/home/gerson/.cache/node-gyp/20.11.1/<(target_arch)/node.lib', npm ERR! gyp info spawn args '-Dmodule_root_dir=/home/gerson/.asdf/installs/nodejs/20.11.1/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: /home/gerson/.asdf/installs/nodejs/20.11.1/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> (/home/gerson/.asdf/installs/nodejs/20.11.1/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 Linux 6.5.0-26-generic npm ERR! gyp ERR! command "/home/gerson/.asdf/installs/nodejs/20.11.1/bin/node" "/home/gerson/.asdf/installs/nodejs/20.11.1/lib/node_modules/nativescript/node_modules/.bin/node-gyp" "rebuild" npm ERR! gyp ERR! cwd /home/gerson/.asdf/installs/nodejs/20.11.1/lib/node_modules/nativescript/node_modules/fsevents npm ERR! gyp ERR! node -v v20.11.1 npm ERR! gyp ERR! node-gyp -v v10.0.1 npm ERR! gyp ERR! not ok
from nativescript-cli.
I have the same Problem on a MacBook Pro M2:
% node -v
v21.7.1
% npm -v
10.5.0
% npm i -g nativescript
npm WARN deprecated [email protected]: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm WARN deprecated [email protected]: Please upgrade to latest, formidable@v2 or formidable@v3! Check these notes: https://bit.ly/2ZEqIau
npm ERR! code 1
npm ERR! path /opt/homebrew/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 [email protected]
npm ERR! gyp info using [email protected] | darwin | arm64
npm ERR! gyp info find Python using Python version 3.12.2 found at "/opt/homebrew/opt/[email protected]/bin/python3.12"
npm ERR! gyp info spawn /opt/homebrew/opt/[email protected]/bin/python3.12
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '/opt/homebrew/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 '/opt/homebrew/lib/node_modules/nativescript/node_modules/fsevents/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/opt/homebrew/lib/node_modules/nativescript/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/Users/amai/Library/Caches/node-gyp/21.7.1/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/amai/Library/Caches/node-gyp/21.7.1',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/opt/homebrew/lib/node_modules/nativescript/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/Users/amai/Library/Caches/node-gyp/21.7.1/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/opt/homebrew/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: /opt/homebrew/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> (/opt/homebrew/lib/node_modules/nativescript/node_modules/node-gyp/lib/configure.js:271:18)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:519: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 "/opt/homebrew/Cellar/node/21.7.1/bin/node" "/opt/homebrew/lib/node_modules/nativescript/node_modules/.bin/node-gyp" "rebuild"
npm ERR! gyp ERR! cwd /opt/homebrew/lib/node_modules/nativescript/node_modules/fsevents
npm ERR! gyp ERR! node -v v21.7.1
npm ERR! gyp ERR! node-gyp -v v10.0.1
npm ERR! gyp ERR! not ok
from nativescript-cli.
See if this helps? nodejs/node-gyp#2992 (comment)
All of the errors above seem to have the Homebrew Python in common.
Maybe the system python would work better - you could also try uninstalling the brew python and try again.
We're likely going to simplify setup and not require python explicitly anymore soon (since it ships with xCode, we can likely use that one where python is needed in the runtime/metadata-generator)
from nativescript-cli.
I could not uninstall python from homebrew, because it is required by other packages like Podman.
Only using NODE_GYP_FORCE_PYTHON=python3 npm i -g nativescript
produced the same error.
from nativescript-cli.
Related Issues (20)
- Error message after upgrading to CLI 8.5.3 HOT 2
- 'tns doctor' error The Python 'six' package not found HOT 1
- Command xcodebuild failed with exit code 65 HOT 4
- [Android] Log stop when app killed and relaunched HOT 1
- DX improvements to workflow - Hotkeys and toggling behavior HOT 1
- Getting error in android native
- ns tries to connect to Google Analytics even when statistics collection permission is denied HOT 1
- Can not install nativescript specific version 6.x.x HOT 2
- Asset validation failed Missing required icon file. The bundle does not contain an app icon for iPhone / iPod Touch of exactly '120x120' pixels, in .png format for iOS versions >= 10.0. To support older versions of iOS, the icon may be required in the bundle outside of an asset catalog. Make sure the Info.plist file includes appropriate entries referencing the file. See https://developer.apple.com/documentation/bundleresources/information_property_list/user_interface (ID: 1109a147-8de2-45b3-8f8e-76007dd019d3) how to solve this
- ns open ios|android
- Replace check for emulator package with check for sdkmanager HOT 1
- TNSNativeSource gets duplicated in Xcode projects HOT 5
- Support pnpm without shamefully-hoist
- Asterisk in package.json version raises Cannot read property of null (reading 'filter')
- Nativescript 8.6 build error while building for Android
- NS preview not working correctly HOT 3
- npms.io search broken since Jan 2023 (a.k.a. remove `search` command from package managers or use `https://registry.npmjs.org/[query]`)
- Deprecate `plugins` command
- I am unable to use my .java file
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nativescript-cli.