Skip to content

Commit 53239cd

Browse files
author
CI User
committed
CLI documentation update from CI
1 parent e9ef086 commit 53239cd

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

content/cli/v8/commands/npm-ci.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,13 @@ In short, the main differences between using `npm install` and `npm ci` are:
5656
* It will never write to `package.json` or any of the package-locks:
5757
installs are essentially frozen.
5858

59+
NOTE: If you create your `package-lock.json` file by running `npm install`
60+
with flags that can affect the shape of your dependency tree, such as
61+
`--legacy-peer-deps`, you _must_ provide the same flags to `npm ci` or you
62+
are likely to encounter errors. An easy way to do this is to run
63+
`npm config set legacy-peer-deps=true --location=project` and commit the
64+
`.npmrc` file to your repo.
65+
5966
### Example
6067

6168
Make sure you have a package-lock and an up-to-date install:

0 commit comments

Comments
 (0)