mirror of
https://github.com/electron/node-gyp.git
synced 2025-08-15 12:58:19 +02:00
doc(wiki): If permissions error, please try and then the command.
This commit is contained in:
parent
d31485415e
commit
ee8e1c1e53
1 changed files with 6 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue