cli icon indicating copy to clipboard operation
cli copied to clipboard

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

Open boeckMt opened this issue 6 years ago • 5 comments

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

boeckMt avatar Aug 31 '20 16:08 boeckMt

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]

boeckMt avatar Aug 31 '20 16:08 boeckMt

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

boeckMt avatar Sep 01 '20 07:09 boeckMt

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. 😊

ruyadorno avatar Sep 03 '20 21:09 ruyadorno

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

isaacs avatar Sep 17 '20 17:09 isaacs

On my counterpart, I reinstalled the stable version of node

briancalma avatar Oct 28 '20 13:10 briancalma