Cli: [BUG] Install of some packages results in Error: `unable to resolve dependency tree`

Created on 31 Aug 2020  路  5Comments  路  Source: npm/cli

Current Behavior:

The installation of some packages results in the Error: unable to resolve dependency tree. This is produced in the file ...@npmcli\arborist\lib\arborist\build-ideal-tree.js when there is no target from check.resolveParent.

If the Installation is run with the flag --legacy-peer-deps it works without Errors.

A Falling Package is e.g. npm i @angular-devkit/build-ng-packagr

Expected Behavior:

The error messages should be more meaningful so that the user knows how to solve the problem.

Steps To Reproduce:

  1. Init new npm Project
  2. npm i @angular-devkit/build-ng-packagr

Environment:

  • OS: Windows_NT 10.0.17763
  • Node: v12.18.3
  • npm: v7.0.0-beta.7
Bug Release 7.x

All 5 comments

I also noticed a similar error Cannot read property 'name' of undefined (https://github.com/npm/arborist/issues/116) if some peerDependency of a package is not compatible with a installed package which also resolves with the flag --legacy-peer-deps.

Steps To Reproduce:

  1. npm i @angular/[email protected]
  2. npm i @clr/[email protected]

Looks like the Issue is already existing on https://github.com/npm/arborist/issues/115 so maybe it can be closed.

Hi @boeckMt, thanks for the feedback 馃槃

That's expected behavior for now, the next pre-release version is going to include a new system that will precisely explain the peer dependency conflicts that led the install to fail. We'd love if you can give it a try once it's out (you should get a notification in the cli) and send us some feedback on how helpful that new error message is now. 馃槉

Closing because we now have more useful error messaging, and can get past most conflicts by using --force.

On my counterpart, I reinstalled the stable version of node

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Cohen-Carlisle picture Cohen-Carlisle  路  4Comments

DullReferenceException picture DullReferenceException  路  4Comments

billop picture billop  路  3Comments

chrisspen picture chrisspen  路  3Comments

theADAMJR picture theADAMJR  路  3Comments