[BUG] Install of some packages results in Error: `unable to resolve dependency tree`
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:
- Init new npm Project
- npm i @angular-devkit/build-ng-packagr
Environment:
- OS: Windows_NT 10.0.17763
- Node: v12.18.3
- npm: v7.0.0-beta.7
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:
- npm i @angular/[email protected]
- 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