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

Can't install @nanostores/query (npm ERR! code ERESOLVE) #44

Closed
overtune opened this issue May 24, 2024 · 2 comments · Fixed by #43
Closed

Can't install @nanostores/query (npm ERR! code ERESOLVE) #44

overtune opened this issue May 24, 2024 · 2 comments · Fixed by #43

Comments

@overtune
Copy link

Hi!

I just updated nanostores and @nanostores/query in a project, but got npm errors.
So I tested to install these two packages in a new and empty project and got the same errors...

First I installed nanostores:

➜  npm i nanostores

added 1 package, and audited 2 packages in 2s

That works, but when I install @nanostores/query I get an ERESOLVE error:

➜  npm i @nanostores/query
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: undefined@undefined
npm ERR! Found: nanostores@0.10.3
npm ERR! node_modules/nanostores
npm ERR!   nanostores@"^0.10.3" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer nanostores@">0.10" from @nanostores/query@0.3.0
npm ERR! node_modules/@nanostores/query
npm ERR!   @nanostores/query@"*" 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.

I use node v20.11.1 (npm v10.2.4).
If I try installing an older version of @nanostores/query (npm i @nanostores/query@0.2.10) everything works fine.

Is this some problem with @nanostores/query or is it my machine?

@dkzlv
Copy link
Member

dkzlv commented May 24, 2024

@overtune Hey!

All's good, don't worry. I made a mistake when set the lower requirement for nanostores as peer dedendency. It's gonna be fixed shortly in #43.

TIL npm doesn't allow installing a dep at all in this case. That's crazy, yarn and pnpm show an error but proceed with the install.

@mrfratello
Copy link

as a workaround, you can write in the package.json of project:

  "overrides": {
    "nanostores": "$nanostores"
  }

and then install @nanostores/query

@dkzlv dkzlv closed this as completed in #43 May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants