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

Unable to install nativescript (CLI) #1746

Open
ngdangtu-vn opened this issue Apr 30, 2024 · 2 comments
Open

Unable to install nativescript (CLI) #1746

ngdangtu-vn opened this issue Apr 30, 2024 · 2 comments

Comments

@ngdangtu-vn
Copy link

I tried to install nativescript but it keep failing. Could it be because nativescript uses depercated packages?

# 1st attempt
volta install nativescript

# 2nd attempt
volta run --node 20 npm i -g nativescript

Here is the output from the second attempt.

npm WARN deprecated [email protected]: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm ERR! code 1
npm ERR! path ~/.local/bin-ins/volta/tmp/image/packages/.tmpxz6NA4/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.10.12 found at "/usr/bin/python3"
npm ERR! gyp info spawn /usr/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '~/.local/bin-ins/volta/tmp/image/packages/.tmpxz6NA4/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 '~/.local/bin-ins/volta/tmp/image/packages/.tmpxz6NA4/lib/node_modules/nativescript/node_modules/fsevents/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '~/.local/bin-ins/volta/tmp/image/packages/.tmpxz6NA4/lib/node_modules/nativescript/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '~/.cache/node-gyp/20.12.2/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=~/.cache/node-gyp/20.12.2',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=~/.local/bin-ins/volta/tmp/image/packages/.tmpxz6NA4/lib/node_modules/nativescript/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=~/.cache/node-gyp/20.12.2/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=~/.local/bin-ins/volta/tmp/image/packages/.tmpxz6NA4/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: ~/.local/bin-ins/volta/tmp/image/packages/.tmpxz6NA4/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> (~/.local/bin-ins/volta/tmp/image/packages/.tmpxz6NA4/lib/node_modules/nativescript/node_modules/node-gyp/lib/configure.js:297: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-10031-tuxedo
npm ERR! gyp ERR! command "~/.local/bin-ins/volta/tools/image/node/20.12.2/bin/node" "~/.local/bin-ins/volta/tmp/image/packages/.tmpxz6NA4/lib/node_modules/nativescript/node_modules/.bin/node-gyp" "rebuild"
npm ERR! gyp ERR! cwd ~/.local/bin-ins/volta/tmp/image/packages/.tmpxz6NA4/lib/node_modules/nativescript/node_modules/fsevents
npm ERR! gyp ERR! node -v v20.12.2
npm ERR! gyp ERR! node-gyp -v v10.1.0
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in: ~/.npm/_logs/2024-04-30T20_27_22_651Z-debug-0.log

My spec:

  • linux: 6.5.0-10031-tuxedo #35 SMP PREEMPT_DYNAMIC Thu Mar 28 11:54:07 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
  • volta: 1.1.1

Here is my attachment log:

2024-04-30T20_27_22_651Z-debug-0.log

@chriskrycho
Copy link
Contributor

If you try installing that directly without Volta, does it work normally?

@ngdangtu-vn
Copy link
Author

Yeah, in the end I have to install pnpm separately (https://pnpm.io/installation) and install nativescript. It worked as expected.

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

No branches or pull requests

2 participants