What it means
Some packages say which version of another package they work with. This is called a peer dependency. In the example, react-dom needs React 18, and your project has React 19. npm refuses to guess, so the install stops. The log names the packages in conflict.
How to fix it
-
Read which packages conflict
The lines in the log name the package, the version found and the version wanted.
-
Make the versions agree
Upgrade or downgrade one of the packages so that they fit together. This is the real fix. Ask your agent: "Resolve the ERESOLVE conflict by aligning versions."
-
Or tell npm to ignore peer conflicts
Add a file named
.npmrcnext topackage.jsonwith this line, then commit it:legacy-peer-deps=trueThis makes npm install anyway, as
npm install --legacy-peer-depsdoes on your machine.
Why it happens
The project often installs on its author's machine, because they ran npm install --legacy-peer-deps once. The lock file written then fails a strict npm ci on a clean server.
What Antideploy does
Antideploy recognises this failure. It adds legacy-peer-deps=true in its own copy of your source for that build, and tells you it did. It never edits your repository. To keep every machine and host building the same way, fix the versions or commit the .npmrc yourself.