Skip to content

Commit

Permalink
docs: Add notes/disclaimers for upgrading npm's bundled node-gyp
Browse files Browse the repository at this point in the history
Also mention that this is tested on npm 8, now that npm 8 exists.
(Npm 8 is the same as npm 7 for purposes of these instructions.)
  • Loading branch information
DeeDeeG committed Dec 17, 2021
1 parent 7f0c77e commit af2b04b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions docs/Updating-npm-bundled-node-gyp.md
@@ -1,5 +1,9 @@
# Updating the npm-bundled version of node-gyp

**Note: These instructions are (only) tested and known to work with npm 8 and older.**

**Note: These instructions will be undone if you reinstall or upgrade your install of npm or node! For a more permanent (and simpler) solution, see [Force-npm-to-use-global-node-gyp.md](https://github.com/nodejs/node-gyp/blob/master/docs/Force-npm-to-use-global-node-gyp.md)**

[Many issues](https://github.com/nodejs/node-gyp/labels/ERR%21%20node-gyp%20-v%20%3C%3D%20v5.1.0) are opened by users who are
not running a [current version of node-gyp](https://github.com/nodejs/node-gyp/releases).

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

Unix is easy. Just run the following command.

If your npm is version ___7___, do:
If your npm is version ___7 or 8___, do:
```bash
$ npm explore npm/node_modules/@npmcli/run-script -g -- npm_config_global=false npm install node-gyp@latest
```
Expand All @@ -52,7 +56,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___, do:
If your npm version is ___7 or 8___, do:
```bash
cd node_modules\npm\node_modules\@npmcli\run-script
```
Expand Down

0 comments on commit af2b04b

Please sign in to comment.