Skip to content

Commit f0882b1

Browse files
committed
fix: missing spaces
1 parent c8c0af7 commit f0882b1

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

docs/Updating-npm-bundled-node-gyp.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ not running a [current version of node-gyp](https://github.com/nodejs/node-gyp/r
66
`npm` bundles its own, internal, copy of `node-gyp`. This internal copy is independent of any globally installed copy of node-gyp that
77
may have been installed via `npm install -g node-gyp`.
88

9-
Generally, npm's library files are installed inside your global "node_modules",where npm is installed (run `npm prefix` and add `lib/node_modules`, or just `node_modules` for Windows). There are some exceptions to this. Inside this global `node_modules/`there will be an `npm/` directory and inside this you'll find a `node_modules/node-gyp/` directory. So it may look something like `/usr/local/lib/node_modules/npm/node_modules/node-gyp/`. This is the version of node-gyp that ships with npm.
9+
Generally, npm's library files are installed inside your global "node_modules", where npm is installed (run `npm prefix` and add `lib/node_modules`, or just `node_modules` for Windows). There are some exceptions to this. Inside this global `node_modules/` there will be an `npm/` directory and inside this you'll find a `node_modules/node-gyp/` directory. So it may look something like `/usr/local/lib/node_modules/npm/node_modules/node-gyp/`. This is the version of node-gyp that ships with npm.
1010

11-
When you install a _new_ version of node-gyp with outside of npm, it'll go into your global node_modules, but not under the `npm/node_modules`. So that may look like `/usr/local/lib/node_modules/node-gyp/`. It'll have the `node-gyp` executable linked into your `PATH` so running `node-gyp` will use this version.
11+
When you install a _new_ version of node-gyp outside of npm, it'll go into your global node_modules, but not under the `npm/node_modules`. So that may look like `/usr/local/lib/node_modules/node-gyp/`. It'll have the `node-gyp` executable linked into your `PATH` so running `node-gyp` will use this version.
1212

1313
The catch is that npm won't use this version unless you tell it to, it'll keep on using the one you have installed. You need to instruct it to by setting the `node_gyp` config variable (which goes into your `~/.npmrc`). You do this by running the `npm config set` command as below. Then npm will use the command in the path you supply whenever it needs to build a native addon.
1414

@@ -23,7 +23,6 @@ npm config set node_gyp $(npm prefix -g)/lib/node_modules/node-gyp/bin/node-gyp.
2323
`sudo` may be required for the first command if you get a permission error.
2424

2525
## Windows
26-
@joaocgreis' Windows instructions from [#1753 (comment)](https://github.comnodejs/node-gyp/issues/1753#issuecomment-501827267)
2726

2827
### Windows Command Prompt
2928
```
@@ -38,7 +37,7 @@ npm prefix -g | % {npm config set node_gyp "$_\node_modules\node-gyp\bin\node-gy
3837
```
3938

4039
## Undo
41-
**Beware** if you don't unset the `node_gyp` config option, npm will continue to use the globally installed version of node-gyp rather than the one it ships with,which may end up being newer.
40+
**Beware** if you don't unset the `node_gyp` config option, npm will continue to use the globally installed version of node-gyp rather than the one it ships with, which may end up being newer.
4241

4342
```
4443
npm config delete node_gyp

0 commit comments

Comments
 (0)