The error, verbatim
Jump to the fix ↓npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error Found: react@19.3.0
npm error Could not resolve dependency:
npm error peer react@"^16.8.5 || ^17.0.0 || ^18.0.0" from react-beautiful-dnd@13.1.1
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
Tested on
- npm / Node
- 11.9.0 / 24.14.0; 11.19.1 and 12.2.1 / 24.22.1 (November 1)
- react
- 19.3.0, 19.3.1
- Conflicts
- react-beautiful-dnd 13.1.1; eslint-plugin-react 7.37.5 with ESLint 10.14.0
- OS
- Windows 11 Pro; Ubuntu on GitHub Actions
✓ Last re-run on GitHub Actions · see the run · all repros
Contents
Since npm 7, npm treats a peer dependency that doesn’t match as an error. You get this when one package says it only works with older versions of something you have newer. On November 1, 2026 I re-ran it on npm 11.19.1 and npm 12.2.1: the same error, word for word, so npm 12 didn’t relax anything. The two conflicts I hit most right now:
- React 19 with a package that lists only React 16–18 (here
react-beautiful-dnd) - ESLint 10 with a plugin that lists only up to ESLint 9 (here
eslint-plugin-react, below)
The fix
Read the peer line in the error. One package says it only supports older React (here ^16 || ^17 || ^18) while you have React 19. Pick one of these, from best to quickest:
1. Switch to a package that supports your React version (best)
Most abandoned packages have a maintained fork or successor. For react-beautiful-dnd that’s @hello-pangea/dnd, which declares react: ^18.0.0 || ^19.0.0:
npm install @hello-pangea/dnd2. Tell npm the peer is fine, in package.json (overrides)
If you’ve checked that the package works with your React version, record that in package.json so every future install respects it:
{
"overrides": {
"react-beautiful-dnd": {
"react": "$react",
"react-dom": "$react-dom"
}
}
}$react means “whatever version of react the root project uses”.
3. Turn off strict peer checks for the project (.npmrc)
legacy-peer-deps=true4. One-off flag
npm install --legacy-peer-depsThis works for that one command. But see below.
The same error with ESLint 10
ESLint 10 came out recently, and many plugins still declare ESLint 9 as their newest supported version. eslint-plugin-react 7.37.5, the current release, is one of them:
npm error Found: eslint@10.14.0
npm error Could not resolve dependency:
npm error peer eslint@"^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7" from eslint-plugin-react@7.37.5
The same overrides fix works, pointing the plugin at your ESLint:
{
"overrides": {
"eslint-plugin-react": {
"eslint": "$eslint"
}
}
}The override only tells npm to stop checking. The plugin worked for the rules I ran, but its authors haven’t declared ESLint 10 support yet, so test the rules you rely on.
Who wants which version?
The error names one conflict at a time. npm explain shows every package that depends on a version, and after an override it marks what you changed:
react@19.3.1
node_modules/react
react@"^19.3.1" from the root project
peer overridden react@"^19.3.1" (was "^16.8.5 || ^17.0.0 || ^18.0.0") from react-beautiful-dnd@13.1.1
Run npm explain react (or eslint) after any fix to see what you actually told npm.
What didn’t work
npm error code ERESOLVE
npm error ERESOLVE could not resolve
npm error While resolving: react-beautiful-dnd@13.1.1
npm error Found: react@19.3.1
That’s exactly what your teammates and CI run. With option 2 (overrides), both a clean npm install and npm ci passed. Use option 2 or 3 to make the fix stick.
Why it happens
Since npm 7, npm installs peer dependencies automatically and treats an unmatched peer range as an error. React 19 is newer than many packages’ declared ranges, so upgrading React, or starting a new project on it, triggers this for any package that hasn’t updated its peerDependencies.
Installing past the error doesn’t mean the package actually works on React 19. That only tells you npm stopped complaining. Test the feature you use from it.
How this was tested
First on September 22, 2026 on Windows 11 Pro (npm 11.9.0, Node 24.14.0, React 19.3.0). Re-run on November 1 on GitHub Actions ubuntu-latest with Node 24.22.1, npm 11.19.1 and npm 12.2.1: each conflict in an empty project, then each fix followed by a clean npm install and an npm ci. The ESLint 10 plugin run was on Windows with ESLint 10.14.0. Error text is copied from the runs. The script and the output are public.
— N.K., end of entry No.006