Skip to content

Commit 0fce46b

Browse files
cclaussrvagg
authored andcommitted
doc(wiki): Different commands for Windows npm v6 vs. v7
1 parent 9285ff6 commit 0fce46b

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

Updating-npm's-bundled-node-gyp.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,22 +26,27 @@ First we need to find the location of `node`. If you don't already know the loca
2626
$ where node
2727
```
2828

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

34-
Now you can run:
34+
Now we need to know your version of `npm`:
3535
```bash
36-
$ npm install node-gyp@latest
36+
npm --version
37+
```
38+
39+
If your npm version is ___7 or greater___, do:
40+
```bash
41+
cd node_modules\npm\node_modules\@npmcli\run-script
3742
```
3843

39-
Now `cd` to the `npm-lifecycle` directory:
44+
If your npm version is ___less than 7___, do:
4045
```bash
41-
$ cd node_modules\npm-lifecycle
46+
cd node_modules\npm\node_modules\npm-lifecycle
4247
```
4348

44-
Now you can finally run (again):
49+
Finish by running:
4550
```bash
4651
$ npm install node-gyp@latest
4752
```

0 commit comments

Comments
 (0)