📦Package version conflict (ERESOLVE)
npm ERR! ERESOLVE unable to resolve dependency tree
The packages you're installing want different versions of each other, so npm stopped the install.
🤔 Why does it happen?
- The new package doesn't match the project's current React or Next.js version
- Old packages and the latest packages are mixed together
🔧 Try this
- Read the error to see which package wants which version
- Install the latest version of that package, or a version that fits your project
- --legacy-peer-deps is only a quick workaround, so ask the AI whether it's OK before using it
🤖 Ask your AI like this
I get the ERESOLVE error below when I run npm install. Please explain which packages have conflicting versions, and tell me the safest way to fix it (installing matching versions). [Paste the full error here]
Replace the [ ] parts with your own situation, and paste the error with a few extra lines before and after it.
Related terms
Other errors in this group
- Module not found
Module not found: Can't resolve - Command not found
command not found - Port already in use
EADDRINUSE: address already in use - Types don't match (TypeScript)
Type 'X' is not assignable to type 'Y' - No permission, so install failed (EACCES)
EACCES: permission denied - Node version doesn't match
The engine "node" is incompatible with this module - Out of memory (heap out of memory)
JavaScript heap out of memory - Can't use import statements (module settings)
SyntaxError: Cannot use import statement outside a module - Build failed on code checks (ESLint)
Failed to compile — ESLint errors - File or folder not found (ENOENT)
ENOENT: no such file or directory