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

Update docs node-gyp update when using nvm #2791

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions docs/Updating-npm-bundled-node-gyp.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ $ npm explore npm/node_modules/npm-lifecycle -g -- npm install node-gyp@latest

If the command fails with a permissions error, please try `sudo` and then the command.

If you are using `nvm` and the logs indicate no change of the `node-gyp` version, you might need to specify the `node` version, for example do:
```bash
$ cd /home/user/.nvm/versions/node/v18.13.0/node_modules/npm/node_modules/@npmcli/run-script
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing this. Please clarify for the reader how you chose this path. Also, what about adding npm list before and after so the reader knows how to verify that the expected changes were made.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While you are in here, can you please update line 32 to say 7 or greater you cover npm 9.

$ npm install node-gyp@latest
```


## Windows

Windows is a bit trickier, since `npm` might be installed to the "Program Files" directory, which needs admin privileges in order to
Expand Down