-
-
Notifications
You must be signed in to change notification settings - Fork 690
Description
Checklist
- I have tried restarting my IDE and the issue persists. --> issue has nothing to do with the IDE
- I have read the FAQ and my problem is not listed.
Tell us about your environment
- ESLint version: ^7.32.0
- eslint-plugin-vue version: ^8.0.3
- Node version: v16.16.0
- Operating System: Ubuntu 21.10
This is an issue with the installation of ESLint, so I deleted the template, as the issue has nothing to do with how ESLint is configured or works with my source code.
This is what I did:
I have a Vue 2 project that was set up using vue-cli
a couple of days ago. It had all ESLint stuff configured and it worked well enough to be useful (I'm not gonna rant about how messed up the whole process of setting up ESLint with Vue & VSCode is).
Today I tried to install a totally unrelated package via npm install
and got this:
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.
no, it really doesn't have anything to do with this package that I tried to install. I tried it again with some other packages with the same outcome
This is what I tried to fix it:
As vue-cli
doesn't seem to have a remove command, I deleted all packages that were mentioned in this error log as well as everything else that was related to eslint from my package.json
, removed package-lock.json
and the node_modules
directory. Then I ran npm install
(which ran through without an error) and vue-cli add @vue/cli-plugin-eslint
(as recommended in the Vue docs). During the installation process I selected "Standard" config. The installation ran though without any errors. Except for an "duplicate key" error because I did not delete my .eslintrc.js
before, which I resolved manually.
ESLint works as good (or bad) as before. But the above error persists: whenever I try to install anything else via npm install
, the peer dependency error about ESLint is thrown.
As a workaround for installing new packages, I remove everything related to ESLint, install the package, and then add it via vue add
again.
Please let me know which additional info you need to help me fix this problem.