Skip to content

ESLint + Typescript results in dependency errors since v9.0.0 inclusion on svelte@latest #12105

@danxcraig

Description

@danxcraig

Describe the bug

When using TypeScript syntax and ESLint with svelte@latest, dependencies cannot be resolved.

Reproduction

npm create svelte@latest example-project

  • Skeleton project
  • Yes, using TypeScript syntax
  • Add ESLint
    cd example-project
    npm install

Logs

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: example-project@0.0.1
npm ERR! Found: eslint@9.0.0
npm ERR! node_modules/eslint
npm ERR!   dev eslint@"^9.0.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer eslint@"^8.56.0" from typescript-eslint@7.6.0
npm ERR! node_modules/typescript-eslint
npm ERR!   dev typescript-eslint@"^7.5.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 resolution error report

While resolving: example-project@0.0.1
Found: eslint@9.0.0
node_modules/eslint
  dev eslint@"^9.0.0" from the root project

Could not resolve dependency:
peer eslint@"^8.56.0" from typescript-eslint@7.6.0
node_modules/typescript-eslint
  dev typescript-eslint@"^7.5.0" from the root project

System Info

System:
    OS: Windows 10 10.0.19045
    CPU: (8) x64 Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz
    Memory: 21.00 GB / 31.92 GB
  Binaries:
    Node: 20.11.0 - C:\Program Files\nodejs\node.EXE
    npm: 10.2.4 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Chrome: 123.0.6312.107
    Edge: Chromium (123.0.2420.81)
    Internet Explorer: 11.0.19041.3636

Severity

blocking an upgrade

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions