Skip to content

Commit faf6d48

Browse files
authored
docs: Add notes/disclaimers for upgrading the copy of node-gyp that npm uses (#2585)
1 parent 6e8f93b commit faf6d48

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

docs/Force-npm-to-use-global-node-gyp.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Force npm to use global installed node-gyp
22

3+
**Note: These instructions only work with npm 6 or older. For a solution that works with npm 8 (or older), see [Updating-npm-bundled-node-gyp.md](Updating-npm-bundled-node-gyp.md).**
4+
35
[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
46
not running a [current version of node-gyp](https://github.com/nodejs/node-gyp/releases).
57

docs/Updating-npm-bundled-node-gyp.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Updating the npm-bundled version of node-gyp
22

3+
**Note: These instructions are (only) tested and known to work with npm 8 and older.**
4+
5+
**Note: These instructions will be undone if you reinstall or upgrade npm or node! For a more permanent (and simpler) solution, see [Force-npm-to-use-global-node-gyp.md](Force-npm-to-use-global-node-gyp.md). (npm 6 or older only!)**
6+
37
[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
48
not running a [current version of node-gyp](https://github.com/nodejs/node-gyp/releases).
59

@@ -25,7 +29,7 @@ npm --version
2529

2630
Unix is easy. Just run the following command.
2731

28-
If your npm is version ___7___, do:
32+
If your npm is version ___7 or 8___, do:
2933
```bash
3034
$ npm explore npm/node_modules/@npmcli/run-script -g -- npm_config_global=false npm install node-gyp@latest
3135
```
@@ -52,7 +56,7 @@ Now `cd` to the directory that `node.exe` is contained in e.g.:
5256
$ cd "C:\Program Files\nodejs"
5357
```
5458

55-
If your npm version is ___7___, do:
59+
If your npm version is ___7 or 8___, do:
5660
```bash
5761
cd node_modules\npm\node_modules\@npmcli\run-script
5862
```

0 commit comments

Comments
 (0)