Reputation: 27
This is the error I'm getting while installing @ngrx/store
. Can anyone help to resolve this error
PS C:\Users\Welcome\ngrx-test> npm install @ngrx/store
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: @angular/[email protected]
npm ERR! node_modules/@angular/core
npm ERR! @angular/core@"~11.0.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/core@"^10.0.0" from @ngrx/[email protected]
npm ERR! node_modules/@ngrx/store
npm ERR! @ngrx/store@"*" 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.
npm ERR!
npm ERR! See C:\Users\Welcome\AppData\Local\npm-cache\eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Welcome\AppData\Local\npm-cache\_logs\2021-01-12T15_07_10_434Z-debug.log
Upvotes: 1
Views: 7337
Reputation: 141
Here are the possible solutions you can try:
npm v5 and above:
npx rimraf ./**/node_modules
npm cache clear --force
npm install @ngrx/store
npm v4 or below:
npm install rimraf -g
rimraf .\**\node_modules
npm cache clear --force
npm install @ngrx/store
Try to install with the legacy peer dependencies option which will ignore peerDependencies
while installing.
npm install @ngrx/store --legacy-peer-deps
If that doesn't work, then try the force option.
npm install @ngrx/store --force
@ngrx/store
If none of the options above work, you can try installing a different version of @ngrx/store
.
npm install @ngrx/[email protected]
node
& npm
Finally, as a last resort, you can try downgrading or upgrading your node
and npm
versions.
Here are instructions on how to do so.
Upvotes: 4