doc(wiki): Different commands for Windows npm v6 vs. v7

This commit is contained in:
Christian Clauss 2021-06-02 08:01:29 +02:00 committed by Rod Vagg
parent 9285ff6e45
commit 0fce46b533

View file

@ -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:
```bash
$ npm install node-gyp@latest
```
Now `cd` to the `npm-lifecycle` directory:
```bash
$ cd node_modules\npm-lifecycle
```
Now you can finally run (again):
Now we need to know your version of `npm`:
```bash
npm --version
```
If your npm version is ___7 or greater___, do:
```bash
cd node_modules\npm\node_modules\@npmcli\run-script
```
If your npm version is ___less than 7___, do:
```bash
cd node_modules\npm\node_modules\npm-lifecycle
```
Finish by running:
```bash
$ npm install node-gyp@latest
```