Menu

npm ERESOLVE unable to resolve dependency tree: 4 fixes
πŸ“°

npm ERESOLVE unable to resolve dependency tree: 4 fixes

DEV Community: nodeΒ·R (RYUSLOG DEV)Β·17 days ago
#e2bf2riN
#devtonodejs#devto#dev#package#react
Long article (921 words) β€” no AI summary yet.
Reading 0:00
15s threshold

npm install stops before writing anything, and instead of a package list you get a tree dump:

npm error code ERESOLVE npm error ERESOLVE unable to resolve dependency tree

npm error While resolving: [email protected] npm error Found: [email protected] npm error Could not resolve dependency: npm error peer react@^19.0.0 from [email protected]

Enter fullscreen mode

Exit fullscreen mode

The line that matters is always peer … from … : the project already decided one version, a dependency's peerDependencies excludes it, and npm refuses to guess.

Why it happens at all

Since npm 7, peer dependencies are installed automatically and a conflicting peer range is a hard error. npm 6 installed peers only with a warning, so this class of failure did not exist before.…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.