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
path: root/docs
diff options
context:
space:
mode:
authornlf <quitlahok@gmail.com>2022-04-01 21:33:34 +0300
committerGitHub <noreply@github.com>2022-04-01 21:33:34 +0300
commit85b3c48d2c9bc4199aed699cc4c00ac96c5feebd (patch)
tree48376b309222e29f7352ae178a65e4033e691926 /docs
parent1a7d0d6f94c7f5e33e3426cf8e7a87dd7ad682dc (diff)
docs(ci): add note that configuration must be consistent between install and ci (#4666)
related to #4664
Diffstat (limited to 'docs')
-rw-r--r--docs/content/commands/npm-ci.md7
1 files changed, 7 insertions, 0 deletions
diff --git a/docs/content/commands/npm-ci.md b/docs/content/commands/npm-ci.md
index 97d1aa552..b4ce81186 100644
--- a/docs/content/commands/npm-ci.md
+++ b/docs/content/commands/npm-ci.md
@@ -46,6 +46,13 @@ In short, the main differences between using `npm install` and `npm ci` are:
* It will never write to `package.json` or any of the package-locks:
installs are essentially frozen.
+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
+`npm config set legacy-peer-deps=true --location=project` and commit the
+`.npmrc` file to your repo.
+
### Example
Make sure you have a package-lock and an up-to-date install: