Wiki instructions for updating `npm`'s bundled copy of `node-gyp` need updating
See original GitHub issueSee this comment: https://github.com/nodejs/node-gyp/issues/2354#issuecomment-810429130
To restate the main changes needed:
- The Windows instructions are incorrect, as they use the
-g
flag (meaning, to modify a standalone, global install ofnode-gyp
), whereas the instructions are supposed to be telling you how tocd
into thenpm
folder and locally update the copy/copies ofnode-gyp
installed there. The use of the-g
flag is inappropriate and leads tonpm
retaining its old/outdated copy ofnode-gyp
. - Also, it seems to be necessary (in my testing) to upgrade
node-gyp
in two places, as multiple packages directly depend onnode-gyp
; not onlynpm
itself, but the subdependencynpm-lifecycle
. One mustcd
into each package and upgrade itsnode-gyp
dependency manually.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:20 (18 by maintainers)
Top Results From Across the Web
node-gyp - npm
node -gyp is a cross-platform command-line tool written in Node.js for compiling native addon modules for Node.js. It contains a vendored copy of...
Read more >How to updated node-gyp and/or interpret "node-gyp rebuild 2 ...
I resolved by updating the npm package. Try: npm install -g npm ... I received a (node-gyp rebuild 2> builderror.log) || (exit 0)...
Read more >Changelog | Meteor API Docs
In case you want types in your app using the core packages ... The node-gyp npm package has been updated to version 6.0.1,...
Read more >Packaging:Node.js - Fedora Project Wiki
The name of a Node.js extension/library package must start with nodejs- then the upstream name or name used in the npm registry. For...
Read more >Node.js - ArchWiki
3.1 npm help does not display documentation; 3.2 node-gyp errors ... To display obsolete packages that may need to be updated: $ npm...
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
Thanks massively for your precision in fixing our docs.
Tested again reading/copy-pasting straight from the wiki page, and I can confirm it is working as written. Thank you very much!
Test scenarios:
n
, in a non-root-protected area (nosudo
needed for this case)… Instructions work as written for npm 6 and 7, respectively ✔️.zip
archive… Instructions work as written for npm 6 and 7, respectively. ✔️Idle thoughts (no action needed) regarding
sudo
or Administratorcmd.exe
prompt: Users with Node installed in a non-protected area in Windows won’t need Administrator command prompt, just as Unix users don’t needsudo
if their copy of Node is installed in a non root-owned/protected area. I think we explain this well enough in the Windows instructions, even if we don’t say so explicitly. I trust Linux users to figure it out. Using elevated permissions doesn’t hurt in this case, anyhow.