Skip to content

Commit

Permalink
docs: npm is currently v10 (#2970)
Browse files Browse the repository at this point in the history
  • Loading branch information
cclauss authored Jan 29, 2024
1 parent a87d0bf commit 7705a22
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions docs/Updating-npm-bundled-node-gyp.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ This means that while `node-gyp` doesn't get installed into your `$PATH` by defa
attempt to `npm install` a native add-on.

Sometimes, you may need to update npm's internal node-gyp to a newer version than what is installed. A simple `npm install -g node-gyp`
_won't_ do the trick since npm will still continue to use its internal copy over the global one.
_won't_ do the trick since npm will continue to use its internal copy over the global one.

So instead:

Expand All @@ -29,7 +29,7 @@ npm --version

Unix is easy. Just run the following command.

If your npm is version ___7 or 8___, do:
If your npm is version ___7 or higher___, do:
```bash
$ npm explore npm/node_modules/@npmcli/run-script -g -- npm_config_global=false npm install node-gyp@latest
```
Expand All @@ -43,10 +43,9 @@ If the command fails with a permissions error, please try `sudo` and then the co

## Windows

Windows is a bit trickier, since `npm` might be installed to the "Program Files" directory, which needs admin privileges in order to
modify on current Windows. Therefore, run the following commands __inside a `cmd.exe` started with "Run as Administrator"__:
Windows is a bit trickier, since `npm` might be installed in the "Program Files" directory, which needs admin privileges to modify current Windows. Therefore, run the following commands __inside a `cmd.exe` started with "Run as Administrator"__:

First we need to find the location of `node`. If you don't already know the location that `node.exe` got installed to, then run:
First, we need to find the location of `node`. If you don't already know the location that `node.exe` got installed to, then run:
```bash
$ where node
```
Expand All @@ -56,7 +55,7 @@ Now `cd` to the directory that `node.exe` is contained in e.g.:
$ cd "C:\Program Files\nodejs"
```

If your npm version is ___7 or 8___, do:
If your npm version is ___7 or higher___, do:
```bash
cd node_modules\npm\node_modules\@npmcli\run-script
```
Expand Down

0 comments on commit 7705a22

Please sign in to comment.