Reactjs - Why NPM Install Keeps Giving Dependency Error - Stack Overflow
Reactjs - Why NPM Install Keeps Giving Dependency Error - Stack Overflow
- Stack Overflow
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.
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
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.
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
https://stackoverflow.com/questions/71706380/why-npm-install-keeps-giving-dependency-error 2/2