npm cannot pick a compatible set of dependencies because peer requirements conflict. Align versions (or upgrade both sides) and reinstall.
npm v7+ enforces peer dependencies strictly. When two packages demand incompatible peer versions (e.g., plugin wants React 17 while you installed React 18), the resolver aborts with ERESOLVE and shows a conflict tree.
npm prints the conflicting packages. Read the requested vs installed versions to identify which pair is incompatible.
Pick compatible versions (upgrade/downgrade both). Example for React:
npm install react@17 react-dom@17
# or upgrade plugin to support React 18
npm install some-plugin@latestAfter adjusting versions, reinstall to refresh the lockfile:
rm -rf node_modules package-lock.json
npm installIf you must force a version, add an override in package.json:
{
"overrides": {
"some-plugin/react": "18.0.0"
}
}Re-run npm install. Test carefully because forced peers may break runtime.
Avoid --legacy-peer-deps as a long-term fix; it skips peer validation and can hide real incompatibilities. Prefer aligning the ecosystem on the same major version.
npm notice access token expired or revoked. Please try logging in again.
Token has expired - npm authentication failure
npm ERR! code EAI_AGAIN
How to fix "EAI_AGAIN" in npm
npm error code E403 npm error 403 Forbidden - PUT https://registry.npmjs.org/<package>
How to fix 'E403 Forbidden' error in npm
npm ERR! code EUSAGE npm ERR! Usage error
How to fix "npm ERR! code EUSAGE" in Node.js projects
npm ERR! code E401 npm ERR! 401 Unauthorized
How to fix "E401 Unauthorized" in npm