0% found this document useful (0 votes)
50 views

Reactjs - Why NPM Install Keeps Giving Dependency Error - Stack Overflow

The document is a Stack Overflow post asking why npm install keeps giving dependency errors. The OP provides error messages showing a conflict between React version 17 and a dependency on React 16. The top answer explains that the react-quill package requires an older version of React and recommends updating to the beta version of react-quill which supports React 17.

Uploaded by

diegocytv2018
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
50 views

Reactjs - Why NPM Install Keeps Giving Dependency Error - Stack Overflow

The document is a Stack Overflow post asking why npm install keeps giving dependency errors. The OP provides error messages showing a conflict between React version 17 and a dependency on React 16. The top answer explains that the react-quill package requires an older version of React and recommends updating to the beta version of react-quill which supports React 17.

Uploaded by

diegocytv2018
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

18/10/23, 12:45 reactjs - Why npm install keeps giving dependency error?

- Stack Overflow

Why npm install keeps giving dependency error?


Asked 1 year, 6 months ago Modified 1 year, 6 months ago Viewed 2k times

While running npm install i got the following error:

1 While resolving: [email protected]


npm ERR! Found: [email protected]
npm ERR! node_modules/react
npm ERR! react@"17.0.2" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^0.14.9 || ^15.3.0 || ^16.0.0" from [email protected]
npm ERR! node_modules/react-quill
npm ERR! dev react-quill@"1.3.5" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

I tried removing package-json and deleting node modules and reinstalling them but still couldn't
solve it. Please give me suggestion on how to fix it.

reactjs npm npm-install react-quill

Share Improve this question Follow edited Apr 5, 2022 at 11:57 asked Apr 1, 2022 at 11:43
Monstar Madan Mahat
825 1 6 23 43 6

2 Answers Sorted by: Highest score (default)

¿No encuentras la respuesta? Pregunta en Stack Overflow en español.

It seems react-quill 1.3.5 uses React ^16.0.0 and not React ^17.0.0 as a dependency while you are
running React v17.
0
From this other post :

Due to the large number of modules that haven't specifically added React v17 as a
peerDependency, it's now commonplace to encounter the unable to resolve dependency
tree error when running npm installs within a v17 React application.

https://stackoverflow.com/questions/71706380/why-npm-install-keeps-giving-dependency-error 1/2
18/10/23, 12:45 reactjs - Why npm install keeps giving dependency error? - Stack Overflow

This error will fire whenever a module (or any of its own dependencies) lists a previous
version of React as a peerDependency without specifically including React v17 as well.

The newer version of react-quill (v2.0.0-beta) is using React v17 so one option would be to install
it.

npm install react-quill@beta

See repository issue

Share Improve this answer Follow answered Apr 1, 2022 at 12:35


Monstar
825 1 6 23

You have a dependency tree conflict. Follow this:

1. Delete Packagelock.json
0
2. Delete Node Modules.
3. Update the version of react -quill in package.json to react-quill@beta OR Update the
version of react-quill to beta as it supports react 17 using npm update react-quill@beta

4. Run npm i adn then npm start

Share Improve this answer Follow answered Apr 5, 2022 at 12:05


Ritik Banger
2,135 5 25

https://stackoverflow.com/questions/71706380/why-npm-install-keeps-giving-dependency-error 2/2

You might also like