Skip to content

Commit

Permalink
docs(ci): add note that configuration must be consistent between inst…
Browse files Browse the repository at this point in the history
…all and ci (#4666)

related to #4664
  • Loading branch information
nlf committed Apr 1, 2022
1 parent 1a7d0d6 commit 85b3c48
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docs/content/commands/npm-ci.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 85b3c48

Please sign in to comment.