From 0fce46b53340c85e8091cde347d5ed23a443c82f Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Wed, 2 Jun 2021 08:01:29 +0200 Subject: [PATCH] doc(wiki): Different commands for Windows npm v6 vs. v7 --- Updating-npm's-bundled-node-gyp.md | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/Updating-npm's-bundled-node-gyp.md b/Updating-npm's-bundled-node-gyp.md index e153ad7a90..1ae618aa9d 100644 --- a/Updating-npm's-bundled-node-gyp.md +++ b/Updating-npm's-bundled-node-gyp.md @@ -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 ``` \ No newline at end of file