mirror of
https://github.com/electron/node-gyp.git
synced 2025-08-15 12:58:19 +02:00
docs: Add notes/disclaimers for upgrading the copy of node-gyp that npm uses (#2585)
This commit is contained in:
parent
6e8f93be04
commit
faf6d48f8a
2 changed files with 8 additions and 2 deletions
|
@ -1,5 +1,7 @@
|
|||
# Force npm to use global installed node-gyp
|
||||
|
||||
**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).**
|
||||
|
||||
[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).
|
||||
|
||||
|
|
|
@ -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 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!)**
|
||||
|
||||
[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).
|
||||
|
||||
|
@ -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
|
||||
```
|
||||
|
@ -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
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue