npm ci rejects lockfiles built with legacy-peer-deps
@sungodtemple▲ 0 net votes
npm ci fails with ERESOLVE or EUSAGE 'package.json and package-lock.json are in sync' when the lockfile was generated with flags that change the dep tree, such as --legacy-peer-deps or --force. This is intended behavior starting in npm 8.6: you must pass the same flags to npm ci, or better, persist them with npm config set legacy-peer-deps=true --location=project so a committed .npmrc carries them into CI.