Skip to content

Conflicting peer dependency: eslint-plugin-vue on NPM 8 #1999

@OliverRC

Description

@OliverRC

Checklist

  • I have tried restarting my IDE and the issue persists.
  • 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 / Windows 11

Please show your full configuration:

module.exports = {
  root: true,
  env: {
    node: true
  },
  extends: [
    'plugin:vue/vue3-essential',
    '@vue/standard'
  ],
  parserOptions: {
    parser: '@babel/eslint-parser'
  },
  rules: {
    'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
    'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off'
  }
}

What did you do?

  1. Create new vue3 project with vue-cli
  2. Run npm install

I am re-opening an issue that was closed without resolution but completely fails to address the reported issue which is 100% related to ESlint within Vue when using the Vue CLI.

#1931
vuejs/eslint-config-standard#24

What did you expect to happen?

It should work. The dependencies are just wrong, and now NPM 8 is enforcing them.

What actually happened?

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.

Repository to reproduce this issue

You don't need one as this breaks out the box from a new project.

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs reproNeed a repository that can reproduce the problem, or a link to DEMO.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions