Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornlf <quitlahok@gmail.com>2022-04-14 21:25:39 +0300
committerLuke Karrys <luke@lukekarrys.com>2022-04-20 02:22:20 +0300
commita6ea8843a9761d4392b3344400eb56e07691a91d (patch)
treede1dc71ab9a32ceb1dc295b02449af5b68e8de6e /docs/content
parentbedd8a1f5844b5b379af5a756baa70821d78c610 (diff)
docs: add some more docs for --install-links
Diffstat (limited to 'docs/content')
-rw-r--r--docs/content/commands/npm-ci.md5
-rw-r--r--docs/content/commands/npm-install.md4
2 files changed, 5 insertions, 4 deletions
diff --git a/docs/content/commands/npm-ci.md b/docs/content/commands/npm-ci.md
index b4ce81186..2bb542a72 100644
--- a/docs/content/commands/npm-ci.md
+++ b/docs/content/commands/npm-ci.md
@@ -48,8 +48,9 @@ In short, the main differences between using `npm install` and `npm ci` are:
NOTE: If you create your `package-lock.json` file by running `npm install`
with flags that can affect the shape of your dependency tree, such as
-`--legacy-peer-deps`, you _must_ provide the same flags to `npm ci` or you
-are likely to encounter errors. An easy way to do this is to run
+`--legacy-peer-deps` or `--install-links`, you _must_ provide the same
+flags to `npm ci` or you are likely to encounter errors. An easy way to do
+this is to run, for example,
`npm config set legacy-peer-deps=true --location=project` and commit the
`.npmrc` file to your repo.
diff --git a/docs/content/commands/npm-install.md b/docs/content/commands/npm-install.md
index 7e370319b..5d27f669f 100644
--- a/docs/content/commands/npm-install.md
+++ b/docs/content/commands/npm-install.md
@@ -91,12 +91,12 @@ into a tarball (b).
*npm will not install the package dependencies* in the directory `<folder>`,
but it will create a symlink to `<folder>`.
- > NOTE: If you want to install the content of a directory like a package from the registry instead of creating a link, you would need to use [`npm pack`](/commands/npm-pack) while in the `<folder>` directory, and then install the resulting tarball instead of the `<folder>` using `npm install <tarball file>`
+ > NOTE: If you want to install the content of a directory like a package from the registry instead of creating a link, you would need to use the `--install-links` option.
Example:
```bash
- npm install ../../other-package
+ npm install ../../other-package --install-links
npm install ./sub-package
```