I am trying to install the dependencies from docker file with command RUN npm ci
. But I am getting the following error Conflicting peer dependencies. Fix the upstream dependency conflict, or retry this command with --force, or --legacy-peer-deps to accept an incorrect (and potentially broken) dependency resolution.
. In my local project I have overcome this issue while running npm install --force
. How I can fix this inside the docker while building and running this command RUN npm ci
.
As I have understood npm ci will look it either from the package-lock.json or npm-shrinkwrap.json. But still facing this issue. Cannot figure it out what is causing this.
I also started to get this error on pipe. What is interesting I always have had peer dependency conflict but it was only appearing with npm install. The best option is to run script with flag --legacy-peer-deps it will skip checking peer dependency. Peer dependency should be installed manually in package.json.