npm i angular-in-memory-web-api --save-dev
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/common
npm ERR! @angular/common@"~13.3.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/common@"^14.0.0" from [email protected]
npm ERR! node_modules/angular-in-memory-web-api
npm ERR! dev angular-in-memory-web-api@"*" 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 /home/ts/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/ts/.npm/_logs/2022-07-09T23_51_26_110Z-debug-0.log
Trying to npm install angular-in-memory-web-api and I'm getting errors
3.2k Views Asked by Sylvain Tagnabou At
2
There are 2 best solutions below
0
On
Here your angular version is 13 as shown in error.
Found: @angular/[email protected]
Open this package on npmjs website and look at the versions.
Go to required version and find the install command for that version on top right corner.
Like if your angular version is 14.2.2 install version 14 of angular-in-memory-web-api package.
The package you're trying to install is not matching your project's Angular version. To fix this issue you need to install the version 0.13 of the package :
npm i [email protected] --save-dev