Skip to content

Commit

Permalink
doc(wiki): Different commands for Windows npm v6 vs. v7
Browse files Browse the repository at this point in the history
  • Loading branch information
cclauss authored and rvagg committed Jun 23, 2021
1 parent 9285ff6 commit 0fce46b
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions Updating-npm's-bundled-node-gyp.md
Expand Up @@ -26,22 +26,27 @@ First we need to find the location of `node`. If you don't already know the loca
$ where node
```

Now `cd` to the directory that `node.exe` is contained in, and with `node_modules\npm` at the end. i.e.:
Now `cd` to the directory that `node.exe` is contained in i.e.:
```bash
$ cd "C:\Program Files\nodejs\node_modules\npm"
$ cd "C:\Program Files\nodejs"
```

Now you can run:
Now we need to know your version of `npm`:
```bash
$ npm install node-gyp@latest
npm --version
```

If your npm version is ___7 or greater___, do:
```bash
cd node_modules\npm\node_modules\@npmcli\run-script
```

Now `cd` to the `npm-lifecycle` directory:
If your npm version is ___less than 7___, do:
```bash
$ cd node_modules\npm-lifecycle
cd node_modules\npm\node_modules\npm-lifecycle
```

Now you can finally run (again):
Finish by running:
```bash
$ npm install node-gyp@latest
```

0 comments on commit 0fce46b

Please sign in to comment.