Skip to content

Commit c4e464e

Browse files
jgehrckeruyadorno
authored andcommitted
npm-link: clarify usage of global prefix
In wondered why npm link doesn't "install to" `npm prefix`. I looked up the documentation for `npm prefix` and found the important distinction between the local prefix, and the global prefix. This attempts to clarity that `npm link` always uses specifically the global prefix. PR-URL: #532 Credit: @jgehrcke Close: #532 Reviewed-by: @ruyadorno
1 parent 82be55c commit c4e464e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/content/cli-commands/npm-link.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ Package linking is a two-step process.
2323

2424
First, `npm link` in a package folder will create a symlink in the global folder
2525
`{prefix}/lib/node_modules/<package>` that links to the package where the `npm
26-
link` command was executed. (see [`npm-config`](npm-config) for the value of `prefix`). It
27-
will also link any bins in the package to `{prefix}/bin/{name}`.
26+
link` command was executed. It will also link any bins in the package to `{prefix}/bin/{name}`.
27+
Note that `npm link` uses the global prefix (see `npm prefix -g` for its value).
2828

2929
Next, in some other location, `npm link package-name` will create a
3030
symbolic link from globally-installed `package-name` to `node_modules/`

0 commit comments

Comments
 (0)