-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[Known Issue] npm i -g nativescript
error: gyp: binding.gyp not found
#10509
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
Comments
This is an issue introduced in NPM As a workaround: npm i -g npm@~10.3
npm i -g nativescript |
npm i -g nativescript
error: gyp: binding.gyp not found
Another issue you may see similar to this can look like this: npm ERR! code 1
npm ERR! path /Users/me/Documents/project/node_modules/better-sqlite3
npm ERR! command failed
npm ERR! command sh -c prebuild-install || node-gyp rebuild --release
npm ERR! prebuild-install warn install No prebuilt binaries found (target=20.11.0 runtime=node arch=arm64 libc= platform=darwin)
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@8.4.1
npm ERR! gyp info using node@20.11.0 | darwin | arm64
npm ERR! gyp info find Python using Python version 3.12.3 found at "/opt/homebrew/opt/python@3.12/bin/python3.12"
npm ERR! gyp info spawn /opt/homebrew/opt/python@3.12/bin/python3.12
... more omitted for brevity ...
npm ERR! Traceback (most recent call last):
npm ERR! File "/Users/me/Documents/project/node_modules/node-gyp/gyp/gyp_main.py", line 42, in <module>
npm ERR! import gyp # noqa: E402
npm ERR! ^^^^^^^^^^
npm ERR! File "/Users/me/Documents/project/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 9, in <module>
npm ERR! import gyp.input
npm ERR! File "/Users/me/Documents/project/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 19, in <module>
npm ERR! from distutils.version import StrictVersion
npm ERR! ModuleNotFoundError: No module named 'distutils' You can set this in your export npm_config_python=/opt/homebrew/bin/python3.11 Just be sure to open new terminal tab, or |
Could this workaround maybe be added to the setup documentation? Would have saved me a couple of days of googling and reinstalling things 😂 |
@jono-hayward it appears fixed on cli For example, this is what we see when installing next - if you get a chance to confirm from your end would be great.
You can |
Issue Description
npm install --global nativescript
Reproduction
npm install --global nativescript
Relevant log output (if applicable)
No response
Environment
No response
Please accept these terms
The text was updated successfully, but these errors were encountered: