1

I have a react repo that in a github action , while doing "npm ci", gives a "Conflicting peer dependency" problem ( using npm 8.5.5 , node 16.14-alpine ).

And that's fine because npm >=7 blocks installations of peer dependencies if it finds any conflict.

But I don't understand why, if I replicate the "npm ci" command in my vscode terminal using very similar versions (npm 8.5.0 and node v16.14.2), I see no error and the installation correctly completes? :-/

Any idea?

Papidev
  • 31
  • 4

1 Answers1

0

I have this problem as well. By installing with --legacy-peer-deps locally and running ci with the same flag, things work. I have not been able to answer why peer dependencies install correctly in my local environment but not with Github actions. I have verified that I'm running the same node version in both places. It seems that if dependencies install locally without the legacy flag, they should in Github Actions, but that is not my experience.

npm i --legacy-peer-deps

npm ci --legacy-peer-deps

Harvey A. Ramer
  • 763
  • 7
  • 13