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 Report][3.5.17] Vuetify can't be installed in an existing project that's using vue-i18n@8.x.x #19720

Open
pcoterecollective opened this issue Apr 30, 2024 · 3 comments
Assignees

Comments

@pcoterecollective
Copy link

pcoterecollective commented Apr 30, 2024

Environment

Vuetify Version: 3.5.17
Vue Version: 3.4.26
Browsers: Chrome 124.0.0.0
OS: Mac OS 10.15.7

Steps to reproduce

  • Clone repo and install dependencies using npm;
  • Run npm i vuetify in terminal;

Expected Behavior

Vuetify should be installed without any issues;

Actual Behavior

Vuetify installation fails with the following error:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: vuetify@3.5.17
npm ERR! Found: vue-i18n@8.25.1
npm ERR! node_modules/vue-i18n
npm ERR!   vue-i18n@"^8.25.1" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peerOptional vue-i18n@"^9.0.0" from vuetify@3.5.17
npm ERR! node_modules/vuetify
npm ERR!   vuetify@"*" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: vue-i18n@9.13.1
npm ERR! node_modules/vue-i18n
npm ERR!   peerOptional vue-i18n@"^9.0.0" from vuetify@3.5.17
npm ERR!   node_modules/vuetify
npm ERR!     vuetify@"*" 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!
...

Reproduction Link

https://github.com/pcoterecollective/vuetify-issue

Other comments

  • This issue is caused by the fact that vuetify has a peer dependency on vue-i18n@^9.0.0, while the root project has a dependency on vue-i18n@^8.25.1. This causes a conflict between the two versions of vue-i18n and the installation fails;
  • Using --force or --legacy-peer-deps flags is not a good solution, as it may lead to potential issues in the future AND/OR may not be an option for all dev/prod servers;
  • Vuetify cannot be considered as an option fur our projects because of that;
@johnleider
Copy link
Member

johnleider commented Apr 30, 2024

What's the fix? Remove the optional peer dependency? I figured that it would be true to its name.

@KaelWD
Copy link
Member

KaelWD commented May 1, 2024

Does vue-i18n 8 even work with vue 3?

I figured that it would be true to its name.

It just means that if it's installed it should match a certain range, they aren't necessarily using any code that interfaces between vue-i18n and vuetify though.

@pcoterecollective
Copy link
Author

pcoterecollective commented May 2, 2024

vue-i18n@8.x.x does work with Vue 3. We're already using it in some Vue 3 projects.

The reason why we couldn't upgrade to vue-i18n@9.x.x is that it's no longer supporting custom formatters which we make an extensive use of in our projects. According to their documentation, this feature will only be re-implemented in next major release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants