5
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
0

2 Answers 2

7

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

Sign up to request clarification or add additional context in comments.

Comments

1

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.