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] Unable to resolve dependencies when trying to install npm packages #4357

Closed
2 tasks done
jtuchel opened this issue Feb 1, 2022 · 2 comments
Closed
2 tasks done
Labels
Bug thing that needs fixing Needs Triage needs review for next steps Release 8.x work is associated with a specific npm 8 release

Comments

@jtuchel
Copy link

jtuchel commented Feb 1, 2022

Is there an existing issue for this?

  • I have searched the existing issues

This issue exists in the latest npm version

  • I am using the latest npm

Current Behavior

I'm facing the same problems as described here

vuejs/pinia#853

I'm using the latest Node and npm version. This bug is related to multiple packages. When trying to setup TailwindCSS for my Vue app I'm facing the same problems.

Expected Behavior

It should be possible to install npm packages

Steps To Reproduce

  1. Create a Vue 3 app
  2. Try to setup Pinia by running npm install pinia or try to setup TailwindCSS by running npm install -D tailwindcss postcss autoprefixer

Environment

  • npm: 8.4
  • Node.js: 17.4
  • OS Name: Windows 11
  • System Model Name: Thinkbook
  • npm config:
; "builtin" config from C:\Users\me\AppData\Roaming\npm\node_modules\npm\npmrc

prefix = "C:\\Users\\me\\AppData\\Roaming\\npm"

; node bin location = C:\Program Files\nodejs\node.exe
; cwd = C:\Users\me
; HOME = C:\Users\me
; Run `npm config ls -l` to show all defaults.
@jtuchel jtuchel added Bug thing that needs fixing Needs Triage needs review for next steps Release 8.x work is associated with a specific npm 8 release labels Feb 1, 2022
@ljharb
Copy link
Contributor

ljharb commented Feb 1, 2022

The error message in the linked issue explicitly explains that your dep graph is invalid - one thing requires vue < 3, and another thing requires vue 3 - which means those things can’t be used together.

@nlf
Copy link
Contributor

nlf commented Feb 1, 2022

The error message in the linked issue explicitly explains that your dep graph is invalid - one thing requires vue < 3, and another thing requires vue 3 - which means those things can’t be used together.

this is exactly correct.

your options are
a) update all of your dependencies to require compatible versions of vue
b) use an override in your package.json like { "overrides": { "vue": "3" } } to force the deps you have to install together anyway

note that with option b you may break things, it's up to you to determine if the override is safe or not.

@nlf nlf closed this as completed Feb 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing Needs Triage needs review for next steps Release 8.x work is associated with a specific npm 8 release
Projects
None yet
Development

No branches or pull requests

3 participants