doc(wiki): If permissions error, please try and then the command.

This commit is contained in:
Christian Clauss 2021-06-11 06:32:31 +02:00 committed by Rod Vagg
parent d31485415e
commit ee8e1c1e53

View file

@ -16,20 +16,22 @@ We need to start by knowing your version of `npm`:
npm --version
```
## Linux, Mac OS X, Solaris, etc.
## Linux, macOS, Solaris, etc.
Unix is easy. Just run the following command. Use `sudo` if necessary.
Unix is easy. Just run the following command.
If your npm is version ___7___, do:
```bash
$ [sudo] npm explore npm/node_modules/@npmcli/run-script -g -- npm_config_global=false npm install node-gyp@latest
$ npm explore npm/node_modules/@npmcli/run-script -g -- npm_config_global=false npm install node-gyp@latest
```
Else if your npm is version ___less than 7___, do:
```bash
$ [sudo] npm explore npm/node_modules/npm-lifecycle -g -- npm install node-gyp@latest
$ npm explore npm/node_modules/npm-lifecycle -g -- npm install node-gyp@latest
```
If the command fails with a permissions error, please try `sudo` and then the command.
## Windows
Windows is a bit trickier, since `npm` might be installed to the "Program Files" directory, which needs admin privileges in order to