vue-cli icon indicating copy to clipboard operation
vue-cli copied to clipboard

Node Js 16.20.0 is not supporting Vue-cli version ~4.5.19

Open aishwarya603 opened this issue 2 years ago • 4 comments

I am trying to upgrade Vue Js Project from Node 14.18.1 to Node 16.20.0. But NPM Install is throwing the below error.

npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! Found: [email protected] npm ERR! node_modules/eslint npm ERR! dev eslint@"^7.29.0" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer eslint@">= 1.6.0 < 7.0.0" from @vue/[email protected] npm ERR! node_modules/@vue/cli-plugin-eslint npm ERR! dev @vue/cli-plugin-eslint@"~4.5.19" 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!

I see eslint 7.29.0 is supports Node V10+ in its documentation(https://www.npmjs.com/package/eslint/v/7.29.0). I would like to understand Is there any reason for the above error. Please help.

My Node Version: 16.20.0 NPM Version: 9.6.7 Machine Windows "vue": "^3.1.0", "@vue/cli-service": "~4.5.19"

aishwarya603 avatar Jun 09 '23 01:06 aishwarya603

Same issue with "@vue/cli-service": "~4.5.0" version

sundar-labsquire avatar Jun 15 '23 09:06 sundar-labsquire

It has nothing to do with the node version, it has all to do with the versions you are trying to use, first of all remove the dependency on eslint, since it's already a peer dependency, so it can pull the correct version

Second, you are using very outdated versions of vue cli

The latest is 5.0.8

Tofandel avatar Jul 27 '23 11:07 Tofandel

[en] The dependent version of my project [zh-cn] 我项目的依赖包

 "dependencies": {
    "axios": "^1.5.0",
    "core-js": "^3.30.2",
    "element-ui": "2.15.13",
    "vue": "^2.7.14",
    "vue-router": "^3.6.5",
    "vuex": "^3.6.2"
  },
  "devDependencies": {
    "@babel/core": "^7.21.8",
    "@babel/eslint-parser": "^7.21.8",
    "@commitlint/cli": "^17.6.3",
    "@commitlint/config-conventional": "^17.6.3",
    "@vue/cli-plugin-babel": "^5.0.8",
    "@vue/cli-plugin-eslint": "^5.0.8",
    "@vue/cli-service": "^5.0.8",
    "@vue/eslint-config-prettier": "^7.1.0",
    "chalk": "^4.1.2",
    "eslint": "^8.41.0",
    "eslint-config-airbnb-base": "^15.0.0",
    "eslint-plugin-import": "^2.27.5",
    "eslint-plugin-prettier": "^4.2.1",
    "eslint-plugin-vue": "^9.13.0",
    "husky": "^8.0.3",
    "less": "^4.1.3",
    "less-loader": "^11.1.0",
    "lint-staged": "^13.2.0",
    "prettier": "^2.8.8",
    "sass": "^1.62.1",
    "sass-loader": "^13.2.2",
    "semver": "^7.5.1"
  },

[en] Stable operation on node 14.21.3 version [zh-cn] 稳定运行在node 14.21.3 版本

LuoRiWuSheng avatar Nov 08 '23 01:11 LuoRiWuSheng

[en] The dependent version of my project [zh-cn] 我项目的依赖包

 "dependencies": {
    "axios": "^1.5.0",
    "core-js": "^3.30.2",
    "element-ui": "2.15.13",
    "vue": "^2.7.14",
    "vue-router": "^3.6.5",
    "vuex": "^3.6.2"
  },
  "devDependencies": {
    "@babel/core": "^7.21.8",
    "@babel/eslint-parser": "^7.21.8",
    "@commitlint/cli": "^17.6.3",
    "@commitlint/config-conventional": "^17.6.3",
    "@vue/cli-plugin-babel": "^5.0.8",
    "@vue/cli-plugin-eslint": "^5.0.8",
    "@vue/cli-service": "^5.0.8",
    "@vue/eslint-config-prettier": "^7.1.0",
    "chalk": "^4.1.2",
    "eslint": "^8.41.0",
    "eslint-config-airbnb-base": "^15.0.0",
    "eslint-plugin-import": "^2.27.5",
    "eslint-plugin-prettier": "^4.2.1",
    "eslint-plugin-vue": "^9.13.0",
    "husky": "^8.0.3",
    "less": "^4.1.3",
    "less-loader": "^11.1.0",
    "lint-staged": "^13.2.0",
    "prettier": "^2.8.8",
    "sass": "^1.62.1",
    "sass-loader": "^13.2.2",
    "semver": "^7.5.1"
  },

[en] Stable operation on node 14.21.3 version [zh-cn] 稳定运行在node 14.21.3 版本

juejin-掘金

LuoRiWuSheng avatar Nov 08 '23 01:11 LuoRiWuSheng