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

Nuxt and vuex-persist: npm ERR! code ERESOLVE #255

Open
gilles6 opened this issue Feb 28, 2022 · 3 comments
Open

Nuxt and vuex-persist: npm ERR! code ERESOLVE #255

gilles6 opened this issue Feb 28, 2022 · 3 comments

Comments

@gilles6
Copy link

gilles6 commented Feb 28, 2022

I'm getting the following error when using npm up after installing npm install --save vuex-persist, what's wrong with this package and my configuration?

I'm using Nuxt ^2.15.8.

❯ npm up
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@"*" from @nuxtjs/[email protected]
npm ERR!   node_modules/@nuxtjs/auth-next
npm ERR!     @nuxtjs/auth-next@"5.0.0-1643791578.532b3d6" from the root project
npm ERR!   peer vue@"^2.6.4" from [email protected]
npm ERR!   node_modules/vuetify
npm ERR!     vuetify@"^2.6.3" from the root project
npm ERR!     vuetify@"^2.6" from @nuxtjs/[email protected]
npm ERR!     node_modules/@nuxtjs/vuetify
npm ERR!       dev @nuxtjs/vuetify@"^1.12.3" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! vuex-persist@"^3.1.3" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: [email protected]
npm ERR! node_modules/vue
npm ERR!   peer vue@"^3.0.2" from [email protected]
npm ERR!   node_modules/vuex
npm ERR!     peer vuex@">=2.5" from [email protected]
npm ERR!     node_modules/vuex-persist
npm ERR!       vuex-persist@"^3.1.3" 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/me/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/me/.npm/_logs/2022-02-28T11_06_47_549Z-debug-0.log

https://stackoverflow.com/questions/71294309/nuxt-and-vuex-persist-npm-err-code-eresolve

@differentMonster
Copy link

i think your nuxt version have conflict with the new vuex-persist, try reinstall 2.3 or 2.2 vuex-persist and give a try.

@otemnov
Copy link

otemnov commented Apr 21, 2022

seems the issue is in package.json:
"peerDependencies": { "vuex": ">=2.5" }

it got resolved up to vue@"^3.0.2" i.e. incompatible version of vue

@gustawdaniel
Copy link

You should install

npm install vuex@3 --save

and then

npm install --save vuex-persist

to be compatible with vue 2

https://v3.vuex.vuejs.org/installation.html#npm

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

4 participants