Open cedon opened 2 years ago
Npm 8 is a lot more strict in dependency resolution. You can use 'npm i --legacy-peer-deps' command until these packages are fixed/updated. You'll have the same issue with audit fix command too.
I forced an upgrade by editing package.json
. I did see Vue-CLI released a new version too so hopefully that fixes the problem too even though I am not seeing anything in the release notes about it.
Ran into the same issue with trying to install pinia as well. Not sure if this should be closed since NPM is the culprit. Switching everything over to yarn eliminated the problem.
Yup, it seems with the latest NPM, it is broken out of the box:
Vue CLI v5.0.8
? Please pick a preset: Manually select features
? Check the features needed for your project: Babel, Linter
? Choose a version of Vue.js that you want to start the project with 3.x
? Pick a linter / formatter config: Standard
? Pick additional lint features: Lint on save
? Where do you prefer placing config for Babel, ESLint, etc.? In dedicated config files
? Save this as a preset for future projects? (y/N)
It looks like the culprit is @vue/eslint-config-standard
, which has a peer dependency on eslint-plugin-vue
at version 7 (^.7.0.0) only. I tried several combinations to resolve the conflict but have not won just yet.
Strangely the material claims the stricter rules for peer dependencies was added in NPM 7/8 but everything worked perfectly on npm version 8.3 but does not on the 8.16.
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.5.0
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.
Version
5.0.4
Environment info
Steps to reproduce
Create new project using 'vue create project' Run npm outdated Run npm upgrade or npm install @formkit/vue
What is expected?
Project dependencies to be upgraded or FormKit or be installed and added as a dependency
What is actually happening?
NPM will throw the following:
npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: testproj@0.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! 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\Jon\AppData\Local\npm-cache\eresolve-report.txt for a full report.