node-gyp version issue
See original GitHub issueThanks for this opportunity to report an issue! I have been using node-gyp on Mac and Windows, and am currently experiencing a problem in Windows. I have:
- Installed VS community 2017
- Installed VS Build tools 2017
- Installed NVM
- Ran nvm install 12.12.0 then nvm use 12.12.0
- Did a npm install –global windows-build-tools from administrator Powershell
- Did an npm config set msvs_version 2017
- Did an npm install –g node-gyp
- Did an npm install –g nw-gyp When I do an npm node-gyp -v , I get the version as 6.11.3 On doing an npm install in VSCode, I get the following within the terminal output:
gyp ERR! command “C:\Program Files\nodejs\node.exe” “C:\Users\r.foss\AppData\Roaming\nvm\v12.12.0\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js” “rebuild”
gyp ERR! cwd D:\Git-Repos\ImmerGo-Demo\immergo-demo\node_modules\midi
gyp ERR! node -v v12.12.0
gyp ERR! node-gyp -v v5.0.3
gyp ERR! This is a bug in node-gyp
.
I can’t understand why the error is occurring, and also why the node-gyp version is indicated as 5.0.3 ? Any help would be much appreciated, thanks!
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
NPM install fails with node-gyp - Stack Overflow
If you have multiple Python versions installed, you can identify which Python version node-gyp uses by setting the '--python' variable:.
Read more >Solving common issues with node-gyp - LogRocket Blog
Solving common issues with node-gyp · node-gyp dependencies · Add-on compilation errors · Binding contract violation · Over 200k developers use ...
Read more >node-gyp - npm
node -gyp requires that you have installed a compatible version of Python, one of: v3.7, v3.8, v3.9, or v3.10. If you have multiple...
Read more >A Comprehensive Guide to Fixing Node-Gyp Issues on Windows
A Comprehensive Guide to Fixing Node-Gyp Issues on Windows · 1. Try running npm install with the --no-optional flag. · 2. Try downloading...
Read more >Troubleshooting node-gyp Package on Windows 11 | DevKimchi
NOTE: The default version of node-gyp is 8.2.0 , which comes with node.js (LTS) 14.13.0 , as the screenshot says. Python not found...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hmm, the instructions in the Wiki for Windows are a bit wrong. Those instructions use the
-g
flag when they shouldn’t.To update
npm
’s copy ofnode-gyp
, one should:[Your_node_dir]\node_modules\npm
andnpm install node-gyp
npm install -g node-gyp
)Also:
npm-lifecycle
has its own dependency onnode-gyp
that should be updated too:[Your_node_dir]\node_modules\npm\node_modules\npm-lifecycle
andnpm install node-gyp
.That is the version that actually gets run when doing an
npm install
, apparently.(I suspect
npm
’s top-level dependency onnode-gyp
is just there to allow more direct and convenient control over the version ofnode-gyp
that gets shipped withnpm
, for thenpm
maintainers. It seems a bit redundant, otherwise.)Apologies for the slow reply - from my side, yes, it can be closed. Thanks for your help!!