Skip to content

Cannot install with latest @nuxtjs/composition-api #1437

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

Closed
phanect opened this issue Jul 8, 2022 · 1 comment
Closed

Cannot install with latest @nuxtjs/composition-api #1437

phanect opened this issue Jul 8, 2022 · 1 comment

Comments

@phanect
Copy link

phanect commented Jul 8, 2022

Reproduction

https://github.com/phanect/repro-pinia-nuxt-composition-api

Steps to reproduce the bug

  1. Run npm init to generate package.json
  2. Run npm install pinia @nuxtjs/composition-api

Expected behavior

npm install successfully install pinia and @nuxt/composition-api

Actual behavior

npm install failed and the following output is shown:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/vue
npm ERR!   peer vue@"^2.7.4" from @nuxtjs/[email protected]
npm ERR!   node_modules/@nuxtjs/composition-api
npm ERR!     @nuxtjs/composition-api@"0.33.0" from the root project
npm ERR!   vue@"^2.6.12" from @nuxt/[email protected]
npm ERR!   node_modules/@nuxt/vue-app
npm ERR!     peer @nuxt/vue-app@"^2.15" from @nuxtjs/[email protected]
npm ERR!     node_modules/@nuxtjs/composition-api
npm ERR!       @nuxtjs/composition-api@"0.33.0" from the root project
npm ERR!     @nuxt/vue-app@"2.15.8" from [email protected]
npm ERR!     node_modules/nuxt
npm ERR!       peer nuxt@"^2.15" from @nuxtjs/[email protected]
npm ERR!       node_modules/@nuxtjs/composition-api
npm ERR!         @nuxtjs/composition-api@"0.33.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! pinia@"2.0.14" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: [email protected]
npm ERR! node_modules/vue
npm ERR!   peer vue@">= 2.5 < 2.7" from @vue/[email protected]
npm ERR!   node_modules/@vue/composition-api
npm ERR!     peerOptional @vue/composition-api@"^1.4.0" from [email protected]
npm ERR!     node_modules/pinia
npm ERR!       pinia@"2.0.14" 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.
npm ERR! 
npm ERR! See /home/phanect/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/phanect/.npm/_logs/2022-07-08T23_38_19_822Z-debug-0.log

Additional information

Pinia has a peerDependency for @vue/composition-api, but latest @nuxt/composition-api requires Vue 2.7 and @vue/composition-api does not support Vue 2.7.
These peerDependencies might be the cause of this conflict.

Pinia's peerDependency for @vue/composition-api is marked optional, but I guess it's not working as expected.

Workaround: npm install --legacy-peer-deps pinia @nuxtjs/composition-api

@posva
Copy link
Member

posva commented Jul 9, 2022

Duplicate of #853

@posva posva marked this as a duplicate of #853 Jul 9, 2022
@posva posva closed this as completed Jul 9, 2022
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

No branches or pull requests

2 participants