From c4e464eda05f46a83d58ad8989abdd0b8d2a21c0 Mon Sep 17 00:00:00 2001 From: Jan-Philip Gehrcke Date: Thu, 28 Nov 2019 11:08:31 +0100 Subject: [PATCH] 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: https://github.com/npm/cli/pull/532 Credit: @jgehrcke Close: #532 Reviewed-by: @ruyadorno --- docs/content/cli-commands/npm-link.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/content/cli-commands/npm-link.md b/docs/content/cli-commands/npm-link.md index 5c417dd143778..a6d2908c4a32a 100644 --- a/docs/content/cli-commands/npm-link.md +++ b/docs/content/cli-commands/npm-link.md @@ -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/` 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/`