Giter Site home page Giter Site logo

Comments (18)

RehArk avatar RehArk commented on June 7, 2024

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.

rigor789 avatar rigor789 commented on June 7, 2024
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.

minichiello avatar minichiello commented on June 7, 2024

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.

alexander-mai avatar alexander-mai commented on June 7, 2024

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.

rigor789 avatar rigor789 commented on June 7, 2024

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.

alexander-mai avatar alexander-mai commented on June 7, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.