Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Wrong dependency resolution failure in clean install #2695

Closed
falsandtru opened this issue Feb 14, 2021 · 3 comments
Closed

[BUG] Wrong dependency resolution failure in clean install #2695

falsandtru opened this issue Feb 14, 2021 · 3 comments
Assignees
Labels
Bug thing that needs fixing Release 7.x work is associated with a specific npm 7 release

Comments

@falsandtru
Copy link

falsandtru commented Feb 14, 2021

typescript@">= 2.8" must match typescript@4.3.0-dev.20210213, right? This error doesn't appear on npm6. Additionally, npm7 can't run npm r to remove unresolvable dependencies.

Current Behavior:

$ npm i
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: spica@0.0.433
npm ERR! Found: typescript@4.3.0-dev.20210213
npm ERR! node_modules/typescript
npm ERR!   dev typescript@"4.3.0-dev.20210213" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer typescript@">= 2.8" from tsify@5.0.2
npm ERR! node_modules/tsify
npm ERR!   dev tsify@"^5.0.2" 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.

Expected Behavior:

no error

Steps To Reproduce:

  1. Checkout https://github.com/falsandtru/spica v0.0.434
  2. Run npm i

Environment:

  • OS: Win10
  • Node: 15.8.0
  • npm: 7.5.4
@falsandtru falsandtru added Bug thing that needs fixing Needs Triage needs review for next steps Release 7.x work is associated with a specific npm 7 release labels Feb 14, 2021
@falsandtru
Copy link
Author

.npmrc

package-lock = false

@nlf nlf removed the Needs Triage needs review for next steps label Feb 16, 2021
@nlf nlf self-assigned this Feb 16, 2021
@nlf
Copy link
Contributor

nlf commented Feb 16, 2021

your dependency tsify has a peer dependency on typescript@">= 2.8" however your package is directly depending on typescript@4.3.0-dev.20210213 which is a conflict.

to get around this, you can either run npm i --force to ignore the conflicts and install anyway, update your tsify dependency to one that has a peerDependency on a matching version of typescript, or change your top level typescript dependency to one that is compatibly with tsify

the reason you don't see this problem in npm 6 is because installing peerDependencies by default is new in npm 7

@falsandtru
Copy link
Author

Ah, thanks...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing Release 7.x work is associated with a specific npm 7 release
Projects
None yet
Development

No branches or pull requests

2 participants