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

npm add of vue-cli-service not working today (worked yesterday) - weird npm dependency error #6595

Closed
adq opened this issue Jul 20, 2021 · 1 comment

Comments

@adq
Copy link

adq commented Jul 20, 2021

Version

4.5.13

Reproduction link

https://github.com/adq/vuecli

Environment info

  System:
    OS: Linux 5.12 Arch Linux
    CPU: (8) x64 Intel(R) Core(TM) i7-4712HQ CPU @ 2.30GHz
  Binaries:
    Node: 16.5.0 - /usr/bin/node
    Yarn: Not Found
    npm: 7.17.0 - /usr/bin/npm
  Browsers:
    Chrome: Not Found
    Firefox: 90.0
  npmPackages:
    vue: ^2.6.11 => 2.6.14 
  npmGlobalPackages:
    @vue/cli: Not Found

Steps to reproduce

Run npm install in my repo -> ok.

Now, run this: npm add -D @vue/cli-service@^4.5.0 -> error:

[adq@shinyandchrome blah]$ npm add -D @vue/cli-service@^4.5.0
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! Found: vue@2.6.14
npm ERR! node_modules/vue
npm ERR!   vue@"^2.6.11" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer @vue/compiler-sfc@"^3.0.8" from vue-loader-v16@16.3.2
npm ERR! node_modules/@vue/cli-service/node_modules/vue-loader-v16
npm ERR!   optional vue-loader-v16@"npm:vue-loader@^16.1.0" from @vue/cli-service@4.5.13
npm ERR!   node_modules/@vue/cli-service
npm ERR!     dev @vue/cli-service@"^4.5.0" from the root project
npm ERR!     2 more (@vue/cli-plugin-router, @vue/cli-plugin-vuex)
npm ERR! 
npm ERR! Conflicting peer dependency: vue@3.1.5
npm ERR! node_modules/vue
npm ERR!   peer vue@"3.1.5" from @vue/compiler-sfc@3.1.5
npm ERR!   node_modules/@vue/compiler-sfc
npm ERR!     peerOptional @vue/compiler-sfc@"^3.0.0-beta.14" from @vue/cli-service@4.5.13
npm ERR!     node_modules/@vue/cli-service
npm ERR!       dev @vue/cli-service@"^4.5.0" from the root project
npm ERR!       2 more (@vue/cli-plugin-router, @vue/cli-plugin-vuex)
npm ERR!     peer @vue/compiler-sfc@"^3.0.8" from vue-loader-v16@16.3.2
npm ERR!     node_modules/vue-loader-v16
npm ERR!       optional vue-loader-v16@"npm:vue-loader@^16.1.0" from @vue/cli-service@4.5.13
npm ERR!       node_modules/@vue/cli-service
npm ERR!         dev @vue/cli-service@"^4.5.0" from the root project
npm ERR!         2 more (@vue/cli-plugin-router, @vue/cli-plugin-vuex)
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/adq/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/adq/.npm/_logs/2021-07-20T16_04_01_591Z-debug.log

This worked yesterday.

What is expected?

it to install vue-cli-service

What is actually happening?

node dependency horror.

@adq adq changed the title npm add of vue-cli-service not working today npm add of vue-cli-service not working today (worked yesterday) - weird npm dependency error Jul 20, 2021
sodatea added a commit to vuejs/vue-loader that referenced this issue Jul 21, 2021
Fixes vuejs/vue-cli#6595
Fixes vuejs/vue-cli#6596

It's not optional actually.

However, in Vue CLI projects for Vue 2, vue-loader v16 is installed but
not used. In that case, the missing peer dependency error should not be
thrown.

There's a dependency check in the entry file anyway.
@sodatea
Copy link
Member

sodatea commented Jul 21, 2021

Fixed in vue-loader@16.3.3

@sodatea sodatea closed this as completed Jul 21, 2021
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