Skip to content

Commit 85b3c48

Browse files
authored
docs(ci): add note that configuration must be consistent between install and ci (#4666)
related to #4664
1 parent 1a7d0d6 commit 85b3c48

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

docs/content/commands/npm-ci.md

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

49+
NOTE: If you create your `package-lock.json` file by running `npm install`
50+
with flags that can affect the shape of your dependency tree, such as
51+
`--legacy-peer-deps`, you _must_ provide the same flags to `npm ci` or you
52+
are likely to encounter errors. An easy way to do this is to run
53+
`npm config set legacy-peer-deps=true --location=project` and commit the
54+
`.npmrc` file to your repo.
55+
4956
### Example
5057

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

0 commit comments

Comments
 (0)