question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bug: vue cli v5 peer dependency conflicts

See original GitHub issue

Prerequisites

Ionic Framework Version

  • v4.x
  • v5.x
  • v6.x

Current Behavior

I followed the steps at https://github.com/ionic-team/ionic-framework/blob/next/BETA.md to start a Framework v6 project, but I get an error when running vue-upgrade --next.

Upgrading @vue/cli-service from 4.5.15 to 5.0.0-rc.1
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: @vue/cli-plugin-babel@4.5.15
npm ERR! Found: @vue/cli-service@5.0.0-rc.1
npm ERR! node_modules/@vue/cli-service
npm ERR!   dev @vue/cli-service@"^5.0.0-rc.1" from the root project

Expected Behavior

I expected to get through the steps

Steps to Reproduce

ionic start --type=vue (I’m running version 6.18.1 of the @ionic/cli)

Name the project vue-test and select a blank project

cd vue-test

Now follow the direction at https://github.com/ionic-team/ionic-framework/blob/next/BETA.md starting with npm install vue@next vue-router@4

When you get to the vue upgrade --next step it will crap out.

vue upgrade --next

✔  Gathering package information...
  Name                         Installed       Wanted          Latest          Command to upgrade
  @vue/cli-service             4.5.15          4.5.15          5.0.0-rc.1      vue upgrade @vue/cli-service --next
  @vue/cli-plugin-babel        4.5.15          4.5.15          5.0.0-rc.1      vue upgrade @vue/cli-plugin-babel --next
  @vue/cli-plugin-e2e-cypress  4.5.15          4.5.15          5.0.0-rc.1      vue upgrade @vue/cli-plugin-e2e-cypress --next
  @vue/cli-plugin-eslint       4.5.15          4.5.15          5.0.0-rc.1      vue upgrade @vue/cli-plugin-eslint --next
  @vue/cli-plugin-router       4.5.15          4.5.15          5.0.0-rc.1      vue upgrade @vue/cli-plugin-router --next
  @vue/cli-plugin-typescript   4.5.15          4.5.15          5.0.0-rc.1      vue upgrade @vue/cli-plugin-typescript --next
  @vue/cli-plugin-unit-jest    4.5.15          4.5.15          5.0.0-rc.1      vue upgrade @vue/cli-plugin-unit-jest --next
? Continue to upgrade these plugins? Yes
Upgrading @vue/cli-service from 4.5.15 to 5.0.0-rc.1
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: @vue/cli-plugin-babel@4.5.15
npm ERR! Found: @vue/cli-service@5.0.0-rc.1
npm ERR! node_modules/@vue/cli-service
npm ERR!   dev @vue/cli-service@"^5.0.0-rc.1" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer @vue/cli-service@"^3.0.0 || ^4.0.0-0" from @vue/cli-plugin-babel@4.5.15
npm ERR! node_modules/@vue/cli-plugin-babel
npm ERR!   dev @vue/cli-plugin-babel@"~4.5.0" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: @vue/cli-service@4.5.15
npm ERR! node_modules/@vue/cli-service
npm ERR!   peer @vue/cli-service@"^3.0.0 || ^4.0.0-0" from @vue/cli-plugin-babel@4.5.15
npm ERR!   node_modules/@vue/cli-plugin-babel
npm ERR!     dev @vue/cli-plugin-babel@"~4.5.0" 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 /Users/daviesd/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/daviesd/.npm/_logs/2021-12-05T18_39_27_466Z-debug.log
 ERROR  command failed: npm install --loglevel error @vue/cli-service@^5.0.0-rc.1 --registry=https://registry.npmjs.org/

I’m running npm 7.22.0 and node 14.17.6.

Code Reproduction URL

No response

Ionic Info

[WARN] Error loading @capacitor/ios package.json: Error: Cannot find module ‘@capacitor/ios/package’

   Require stack:
   - /Users/daviesd/.nvm/versions/node/v14.17.6b/lib/node_modules/@ionic/cli/lib/project/index.js
   - /Users/daviesd/.nvm/versions/node/v14.17.6b/lib/node_modules/@ionic/cli/lib/index.js
   - /Users/daviesd/.nvm/versions/node/v14.17.6b/lib/node_modules/@ionic/cli/index.js
   - /Users/daviesd/.nvm/versions/node/v14.17.6b/lib/node_modules/@ionic/cli/bin/ionic

[WARN] Error loading @capacitor/android package.json: Error: Cannot find module ‘@capacitor/android/package’

   Require stack:
   - /Users/daviesd/.nvm/versions/node/v14.17.6b/lib/node_modules/@ionic/cli/lib/project/index.js
   - /Users/daviesd/.nvm/versions/node/v14.17.6b/lib/node_modules/@ionic/cli/lib/index.js
   - /Users/daviesd/.nvm/versions/node/v14.17.6b/lib/node_modules/@ionic/cli/index.js
   - /Users/daviesd/.nvm/versions/node/v14.17.6b/lib/node_modules/@ionic/cli/bin/ionic

Ionic:

Ionic CLI : 6.18.1 (/Users/daviesd/.nvm/versions/node/v14.17.6b/lib/node_modules/@ionic/cli) Ionic Framework : @ionic/vue 5.9.1

Capacitor:

Capacitor CLI : 3.3.2 @capacitor/android : not installed @capacitor/core : 3.3.2 @capacitor/ios : not installed

Utility:

cordova-res : not installed globally native-run : 1.5.0

System:

NodeJS : v14.17.6 (/Users/daviesd/.nvm/versions/node/v14.17.6b/bin/node) npm : 7.22.0 OS : macOS Big Sur

Additional Information

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:19 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
daviesdoclccommented, Dec 9, 2021
1reaction
liamdebeasicommented, Dec 9, 2021

We have new Ionic 6 starters coming in a few days.

It might be worthwhile filing an issue on https://github.com/vuejs/vue-cli. There may be other non-Ionic developers running into the same issue. I can leave this issue open for now and see if I can find anything that may help. Ultimately, this seems to be a peer dependency conflict with Vue CLI v5, not Ionic.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable resolve dependency after vue upgrade - Stack Overflow
I try to upgrade my vue version from 3.0.2 to latest version with syntax: vue upgrade. after that, my vue @vue/cli-service is upgraded...
Read more >
Migrate from v3 - Vue CLI
It now requires eslint , eslint-plugin-prettier and prettier as peer dependencies, following the standard practice in the ESLint ecosystem.
Read more >
conflicting peer dependency: vue@2.7.10 - You.com
The easiest solution is to run npm install with the --legacy-peer-deps flag. In theory, that may result in some incompatibility issues with peer...
Read more >
Having issues upgrading, updating and installing. : r/vuejs
Conflicting peer dependency : vue@2.7.8 npm ERR! node_modules/vue npm ERR! ... failed: npm install --loglevel error @vue/cli-service@~5.0.8.
Read more >
error during install Babylon - Prime Community Forum
8" from the root project Conflicting peer dependency: eslint@8.23.1 node_modules/eslint peer eslint@">=7.5.0" from @vue/cli-plugin-eslint@5.0.8 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found