question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"Unable to resolve dependency tree" error during NPM install of APM-Start

See original GitHub issue

I am using the Angular: Getting Started Pluralsight lesson and I am attempting to run npm install on the APM-Start folder found in the repository. I am receiving this error message, not entirely sure what it means but I think it might indicate a mismatched version somewhere? I have some experience with npm in the past, though I’ve never been good at troubleshooting it.

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: apm@0.0.0
npm ERR! Found: @angular/compiler@10.0.14
npm ERR! node_modules/@angular/compiler
npm ERR!   @angular/compiler@"~10.0.4" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/compiler@"10.2.4" from @angular/compiler-cli@10.2.4
npm ERR! node_modules/@angular/compiler-cli
npm ERR!   peer @angular/compiler-cli@">=10.0.0-next.0 < 11" from @angular-devkit/build-angular@0.1000.8
npm ERR!   node_modules/@angular-devkit/build-angular
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 /Users/robert.anderson/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/robert.anderson/.npm/_logs/2021-01-05T18_17_06_138Z-debug.log

How would I resolve this issue?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:10
  • Comments:27 (9 by maintainers)

github_iconTop GitHub Comments

58reactions
DeborahKcommented, Jan 5, 2021

Did you see any errors after running npm install?

Did you run npm audit fix? Running the fix will cause a mismatch with your versions, so it should not be run.

Try this:

  1. Delete node_module folder and the package-lock.json file.
  2. Run npm cache verify to verify and clean up your npm.
  3. Run npm install again. (Do NOT run npm audit fix)
  4. Run npm start

Let me know if that resolves the issue.

15reactions
DeborahKcommented, Jan 5, 2021

I haven’t seen that error before.

Had you done anything else? Or installed anything else into that folder?

What version of node and npm do you have?

Reading this: https://stackoverflow.com/questions/64573177/unable-to-resolve-dependency-tree-error-when-installing-npm-packages

Suggests trying:

  • npm install --force
  • npm install --legacy-peer-deps

But I don’t know why you would suddenly see this. The dependencies in the package.json file should all be compatible unless something else was installed to modify it.

EDIT: If you want to continue with the course without having to install anything, try using stackblitz as per the instructions here: https://github.com/DeborahK/Angular-GettingStarted#stackblitz

Read more comments on GitHub >

github_iconTop Results From Across the Web

unable to resolve dependency tree npm - You.com | The search ...
The Unable to resolve dependency tree error when installing npm packages occurs when you install the node dependencies with the latest version of...
Read more >
webpack error unable to resolve dependency tree Code Example
npm install --save react-tinder-card --legacy-peer-deps.
Read more >
How To Resolve Dependency Tree Error When Installing Npm ...
Create a new project using the ABP CLI with Angular as a UI; navigate to the angular folder Error: @ angular % npm...
Read more >
angular - npm won't start - Stack Overflow
Yes. You have to: 1) Install npm and ensure you have a relatively recent version. npm is "node package manager". It includes tools...
Read more >
Deprecate Legacy BIOS (System-Wide Change proposal)
While this will eventually reduce workload for boot/installation ... detailed list of hardware this change affects, is basically impossible.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found