vuejs / vue-cli

🛠️ webpack-based tooling for Vue.js Development
https://cli.vuejs.org/
MIT License
29.76k stars 6.33k forks source link

wrong eslint version for standrad config? #7274

Open samyarkhafan opened 2 years ago

samyarkhafan commented 2 years ago

Version

5.0.8

Environment info

  System:
    OS: Windows 10 10.0.19044
    CPU: (4) x64 Intel(R) Core(TM)2 Quad CPU    Q6600  @ 2.40GHz
  Binaries:
    Node: 16.16.0 - G:\nodejs\node.EXE
    Yarn: Not Found
    npm: 8.17.0 - G:\nodejs\npm.CMD
  Browsers:
    Chrome: Not Found
    Edge: Spartan (44.19041.1266.0), Chromium (104.0.1293.54)
  npmPackages:
    @vue/babel-helper-vue-jsx-merge-props:  1.2.1
    @vue/babel-helper-vue-transform-on:  1.0.2
    @vue/babel-plugin-jsx:  1.1.1
    @vue/babel-plugin-transform-vue-jsx:  1.2.1
    @vue/babel-preset-app:  5.0.8
    @vue/babel-preset-jsx:  1.3.1
    @vue/babel-sugar-composition-api-inject-h:  1.3.0
    @vue/babel-sugar-composition-api-render-instance:  1.3.0
    @vue/babel-sugar-functional-vue:  1.2.2
    @vue/babel-sugar-inject-h:  1.2.2
    @vue/babel-sugar-v-model:  1.3.0
    @vue/babel-sugar-v-on:  1.3.0
    @vue/cli-overlay:  5.0.8
    @vue/cli-plugin-babel: ~5.0.0 => 5.0.8
    @vue/cli-plugin-eslint: ~5.0.0 => 5.0.8
    @vue/cli-plugin-router: ~5.0.0 => 5.0.8
    @vue/cli-plugin-vuex:  5.0.8
    @vue/cli-service: ~5.0.0 => 5.0.8
    @vue/cli-shared-utils:  5.0.8
    @vue/compiler-core:  3.2.37
    @vue/compiler-dom:  3.2.37
    @vue/compiler-sfc:  3.2.37
    @vue/compiler-ssr:  3.2.37
    @vue/component-compiler-utils:  3.3.0
    @vue/devtools-api:  6.2.1
    @vue/eslint-config-standard: ^6.1.0 => 6.1.0
    @vue/reactivity:  3.2.37
    @vue/reactivity-transform:  3.2.37
    @vue/runtime-core:  3.2.37
    @vue/runtime-dom:  3.2.37
    @vue/server-renderer:  3.2.37
    @vue/shared:  3.2.37
    @vue/web-component-wrapper:  1.3.0
    eslint-plugin-vue: ^8.0.3 => 8.7.1
    vue: ^3.2.13 => 3.2.37
    vue-eslint-parser:  8.3.0
    vue-hot-reload-api:  2.3.4
    vue-loader:  17.0.0 (15.10.0)
    vue-router: ^4.0.3 => 4.1.3
    vue-style-loader:  4.1.3
    vue-template-es2015-compiler:  1.9.1
  npmGlobalPackages:
    @vue/cli: Not Found

Steps to reproduce

install node install vue on it with npm install -g @vue/cli create a new project with vue ui (babel, router, css pre processor,linter/formatter,use external config files) and in the end make the config for linter and formatter be : eslint+standard config

go to the project's folder and install a package, npm install axios error about eslint

What is expected?

npm installing the package normally

What is actually happening?

eslint versions not matching the one in package.json


i fixed it by editing the eslint version in package.json temporary. but my question is that, is this a vue bug or an issue in my end?

samyarkhafan commented 2 years ago

note : I can even install things normally with --force and everything works fine, but like i said i wonder if i somehow caused this issue. also the log :

npm ERR! code ERESOLVE npm ERR! ERESOLVE could not resolve npm ERR! npm ERR! While resolving: @vue/eslint-config-standard@6.1.0 npm ERR! Found: eslint-plugin-vue@8.7.1 npm ERR! node_modules/eslint-plugin-vue npm ERR! dev eslint-plugin-vue@"^8.0.3" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer eslint-plugin-vue@"^7.0.0" from @vue/eslint-config-standard@6.1.0 npm ERR! node_modules/@vue/eslint-config-standard npm ERR! dev @vue/eslint-config-standard@"^6.1.0" from the root project npm ERR! npm ERR! Conflicting peer dependency: eslint-plugin-vue@7.20.0 npm ERR! node_modules/eslint-plugin-vue npm ERR! peer eslint-plugin-vue@"^7.0.0" from @vue/eslint-config-standard@6.1.0 npm ERR! node_modules/@vue/eslint-config-standard npm ERR! dev @vue/eslint-config-standard@"^6.1.0" 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 C:\Users\Crysis\AppData\Local\npm-cache\eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Crysis\AppData\Local\npm-cache_logs\2022-08-15T06_39_43_248Z-debug-0.log

couldn't get the file cause i overwrote it

ramen-curator commented 2 years ago

I have the same problem

ramen-curator commented 2 years ago

It looks similar to this issue: https://github.com/vuejs/vue-cli/issues/7189