Skip to content
This repository has been archived by the owner on Feb 4, 2022. It is now read-only.

Could not resolve peer dependency vuex@"^3.0 || ^4.0" with Vuex 4.0.0-rc.2 installed #370

Open
cvisl opened this issue Nov 26, 2020 · 1 comment

Comments

@cvisl
Copy link

cvisl commented Nov 26, 2020

  • vuex-persistedstate version: 4.0.0-beta.1
  • node version: v15.2.1
  • npm (or yarn) version: 7.0.8

Relevant code or config

package.json

{
  "name": "pcit-vr-story-editor",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "serve": "vue-cli-service serve",
    "build": "vue-cli-service build",
    "lint": "vue-cli-service lint"
  },
  "dependencies": {
    "core-js": "^3.6.5",
    "rete": "^1.4.5-rc.1",
    "rete-area-plugin": "^0.2.1",
    "rete-connection-plugin": "^0.9.0",
    "rete-context-menu-plugin": "^0.6.0-rc.1",
    "rete-history-plugin": "^0.2.1",
    "rete-vue-render-plugin": "^0.5.0",
    "vue": "^3.0.0",
    "vue-router": "^4.0.0-0",
    "vuex": "^4.0.0-0"
  },
  "devDependencies": {
    "@typescript-eslint/eslint-plugin": "^2.33.0",
    "@typescript-eslint/parser": "^2.33.0",
    "@vue/cli-plugin-babel": "~4.5.0",
    "@vue/cli-plugin-eslint": "~4.5.0",
    "@vue/cli-plugin-router": "~4.5.0",
    "@vue/cli-plugin-typescript": "~4.5.0",
    "@vue/cli-plugin-vuex": "~4.5.0",
    "@vue/cli-service": "~4.5.0",
    "@vue/compiler-sfc": "^3.0.0",
    "@vue/eslint-config-typescript": "^5.0.2",
    "eslint": "^6.7.2",
    "eslint-plugin-vue": "^7.0.0-0",
    "sass": "^1.26.5",
    "sass-loader": "^8.0.2",
    "typescript": "~3.9.3"
  }
}

What you did:

Try to install vuex-persistedstate with a vue-cli created package.json, nothing special, with:

npm install vuex-persistedstate

What happened:

npm gave the following error:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: pcit-vr-story-editor@0.1.0
npm ERR! Found: vuex@4.0.0-rc.2
npm ERR! node_modules/vuex
npm ERR!   vuex@"^4.0.0-0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer vuex@"^3.0 || ^4.0" from vuex-persistedstate@4.0.0-beta.1
npm ERR! node_modules/vuex-persistedstate
npm ERR!   vuex-persistedstate@"4.0.0-beta.1" 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 /home/casperl/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/casperl/.npm/_logs/2020-11-26T15_07_53_610Z-debug.log

Problem description:

npm can not resolve the peer dependency vuex@"^3.0 || ^4.0" of vuex-persistedstate eventhough I have a vuex ^4.0 version installed.

Is there a way to install it without using --force or --legacy-peer-deps?

@1beb
Copy link

1beb commented Dec 5, 2020

Same problem, bypassed it temporarily with: https://github.com/robinvdvleuten/vuex-persistedstate/pull/374/files by updating the version in peerDependencies. I don't think that style of dependency specification supports anything other than versions with numbers? That's just a guess, I don't know npm that well. I think it has to be parseable which semver, but I don't think the style vuex is using is. https://github.com/npm/node-semver

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

No branches or pull requests

2 participants