Skip to content

Commit

Permalink
npm-link: clarify usage of global prefix
Browse files Browse the repository at this point in the history
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
  • Loading branch information
jgehrcke authored and ruyadorno committed Jan 9, 2020
1 parent 4b30f3c commit 6fb5dbb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/content/cli-commands/npm-link.md
Expand Up @@ -23,8 +23,8 @@ Package linking is a two-step process.

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

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

0 comments on commit 6fb5dbb

Please sign in to comment.