I’m having trouble installing packages for a project I cloned from GitHub. When I run npm install
, it throws an ERESOLVE error.
The error seems to be related to version conflicts between different packages. Here’s what I’m seeing:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: @quill/[email protected]
npm ERR! Found: @quill/[email protected]
npm ERR! node_modules/@quill/core
npm ERR! @quill/core@"^3.1.2" from the root project
npm ERR! peer @quill/core@"^3.1.2" from @quill/[email protected]
npm ERR! node_modules/@quill/plugin-bold
npm ERR! @quill/plugin-bold@"^3.1.2" from @quill/[email protected]
npm ERR! node_modules/@quill/basic-kit
npm ERR! @quill/basic-kit@"^3.1.2" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @quill/core@"^2.8.0" from @quill/[email protected]
npm ERR! node_modules/@quill/plugin-toolbar
npm ERR! @quill/plugin-toolbar@"^2.15.3" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: @quill/[email protected]
npm ERR! node_modules/@quill/core
npm ERR! peer @quill/core@"^2.8.0" from @quill/[email protected]
It looks like there’s a version mismatch between the core package and some extensions. Has anyone encountered this before? What’s the best way to resolve these dependency conflicts without breaking the project?
had that prob b4 too! use npm install --legacy-peer-deps
it kinda skips the peer dep thing and should work fine. helped me out!
I’ve hit this exact issue with packages that haven’t caught up to the latest major versions. The problem is @quill/plugin-toolbar wants an older @quill/core version (^2.8.0) but you’re running 3.1.2. Before going with legacy peer deps, check if there’s a newer @quill/plugin-toolbar that supports @quill/core v3. Maintainers sometimes push compatibility updates without making them the default. You could also try npm install --force
- it’s gentler than legacy peer deps but still bypasses the conflict. If you’re stuck with current versions, use npm overrides in package.json to force which @quill/core version gets used across your entire dependency tree.
Dependency issues like this often arise from mismatched package versions. I have faced similar situations before, and typically, adjusting the version ranges in your package.json can resolve these conflicts. Specifically, ensure that @quill/plugin-toolbar is compatible with your current version of @quill/core (v3). If adjusting the versions doesn’t work, try deleting your node_modules and package-lock.json, then run a fresh install; sometimes the lock file can become corrupted. Additionally, you might consider using the resolutions field in your package.json to explicitly dictate which version of @quill/core should be used during resolution—it’s a more controlled approach than forcing installations.