robinvdvleuten / vuex-persistedstate

💾 Persist and rehydrate your Vuex state between page reloads.
https://npm.im/vuex-persistedstate
MIT License
5.77k stars 378 forks source link

Unmet peer dependency with nuxt #109

Closed pschaub closed 6 years ago

pschaub commented 6 years ago

Do you want to request a feature or report a bug? Bug

What is the current behavior?

warning " > vuex-persistedstate@2.4.2" has unmet peer dependency "vue@^2.0.0".
warning " > vuex-persistedstate@2.4.2" has unmet peer dependency "vuex@^2.0.0 || ^3.0.0".

But I already have Vue 2.5 through Nuxt See https://github.com/nuxt/nuxt.js/blob/dev/package.json#L108 Same for vuex https://github.com/nuxt/nuxt.js/blob/dev/package.json#L114

If the current behavior is a bug, please provide the steps to reproduce.

  1. Use latest nuxt instead of plain vue
  2. Run yarn install or npm install

What is the expected behavior? No error message because vue 2.5 is loaded through nuxt

If this is a feature request, what is motivation or use case for changing the behavior? Nobody want to see such an error message

robinvdvleuten commented 6 years ago

This has nothing to do with this plugin as it is the expected behaviour of how peer dependencies are resolved with either NPM or Yarn. Just do yarn add vue vuex and the warnings will be gone.

manuelmejiaio commented 5 years ago

The @robinvdvleuten's solution works but it's a little bit painful to do it manually (one by one).