Skip to content
Nilay Kabariya

Entry No.021·Fixes·Updated ·4 min read

Fix: typescript-eslint does not support TS 7.0 (ESLint on TS 7)

When typescript-eslint will support TypeScript 7, why npm refuses the install, and the setup that keeps TypeScript 7 while ESLint runs normally today.

The error, verbatim

Jump to the fix ↓
npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error While resolving: my-app@1.0.0
npm error Found: typescript@7.0.2
npm error Could not resolve dependency:
npm error peer typescript@">=4.8.4 <6.1.0" from typescript-eslint@8.70.1

# and after forcing the install:
Error: typescript-eslint does not support TS 7.0.
See also https://github.com/typescript-eslint/typescript-eslint/issues/10940 for tracking typescript-eslint's support for TS >=7.1
✓ Reproduced on Windows 11 Pro

The fix that worked

Keep 7 for tsc, give it 6 side by side:

npm install -D "@typescript/native@npm:typescript@7.0.2" "typescript@npm:@typescript/typescript6@^6.0.2"
Not it? Every cause, tested ↓

Tested on

typescript-eslint
8.70.1; re-tested on 8.72.1 (November 2 and 7)
ESLint
10.11.0; re-tested on 10.14.0
TypeScript
7.0.2 + @typescript/typescript6 6.0.2
Node / npm
24.14.0 / 11.9.0
OS
Windows 11 Pro

✓ Last re-run on GitHub Actions · see the run · all repros

typescript-eslint still declares typescript >=4.8.4 <6.1.0, and that hadn’t moved by November 7, 2026: not in 8.72.1, not in the 8.72.2-alpha.11 canary. So with TypeScript 7 installed you hit one of two walls. A normal npm install refuses with ERESOLVE; force it past that with --legacy-peer-deps and ESLint starts, then stops with typescript-eslint does not support TS 7.0. before linting a single file. Unlike the Angular case, nothing crashes: the refusal is deliberate, and it tells you the fix is on the dependency side, not in your config.

The fix

Install both compilers under different names: TypeScript 7 as @typescript/native for tsc, and Microsoft’s @typescript/typescript6 package under the name typescript, which is the one typescript-eslint loads. Its version satisfies the <6.1.0 peer range, so the strict install passes too (the TypeScript 7.0 announcement describes this setup):

npm install -D "@typescript/native@npm:typescript@7.0.2" "typescript@npm:@typescript/typescript6@^6.0.2"

package.json ends up with:

{
  "devDependencies": {
    "@typescript/native": "npm:typescript@^7.0.2",
    "typescript": "npm:@typescript/typescript6@^6.0.2",
    "eslint": "^10.11.0",
    "typescript-eslint": "^8.70.1"
  }
}

No change to eslint.config.mjs is needed.

When will typescript-eslint support TypeScript 7?

Not in 7.0, and not because of anything typescript-eslint could fix: TypeScript 7.0 has no JavaScript API to support. The error message itself points to issue #10940, which tracks support for TypeScript 7.1 and later. The TypeScript team says 7.1 will ship a new and different API, so typescript-eslint will need a new release built against it even then.

Until that release exists, the side-by-side setup above is the supported way to run TypeScript 7 and ESLint in the same project.

Why the aliases work

Two things are true at once in that setup, and it’s worth checking both on your machine:

npx tsc --version                               # Version 7.0.2  (the Go compiler)
node -p "require('typescript').version"         # 6.0.3          (the API tools import)

tsc comes from the package installed as @typescript/native, which is TypeScript 7. But when typescript-eslint does require('typescript'), npm’s alias hands it @typescript/typescript6, a package Microsoft publishes to carry the 6.x JavaScript API alongside 7. The peer range <6.1.0 is satisfied, so npm stops complaining too.

Why it happens

TypeScript 7 is the compiler rewritten in Go, and version 7.0 ships no JavaScript API. typescript-eslint parses your code by calling that API, so on plain TypeScript 7 it has nothing to call:

node -p "Object.keys(require('typescript'))"
# TypeScript 7.0.2 → [ 'version', 'versionMajorMinor' ]

typescript-eslint knows this, which is why the error is a clear refusal rather than a crash. Its peer range, >=4.8.4 <6.1.0, exists so npm stops you before you get that far.

What didn’t work

Other tools in the same project

The same fix covers ts-node, ts-jest, TypeDoc and ts-loader, which break for the same reason. I ran nine tools against plain TypeScript 7 and against this setup in TypeScript 7 compatibility: 9 tools tested. If ts-node is what’s failing, its error is different: ts-node TypeError reading ‘fileExists’.

Run it yourself

The setup is on GitHub with scripts that break it and restore it, so you can watch each failure and fix on your own machine:

git clone https://github.com/nils44344/node-ts-error-repros
cd node-ts-error-repros/05-typescript-7-side-by-side
npm install && npm run all

How this was tested

A fresh project with ESLint 10.11.0, typescript-eslint 8.70.1 and typescript@7.0.2 on Node 24.14.0 and npm 11.9.0. Strict install first (the ERESOLVE above), then forced installs to reach the runtime error with both the recommended and recommendedTypeChecked configs, then a clean install of the side-by-side setup. Every error and every version number above is the real output from those runs.

November 2, 2026: re-run on GitHub Actions ubuntu-latest (Node 24.22.1, npm 11.19.1) with typescript-eslint 8.72.1, ESLint 10.14.0 and TypeScript 7.0.2. typescript-eslint’s peer range is still >=4.8.4 <6.1.0, the strict install still failed with ERESOLVE, --legacy-peer-deps still led to typescript-eslint does not support TS 7.0. (eslint exit 2), and the side-by-side aliases still gave eslint exit 0 with tsc --version printing 7.0.2. That run’s script and output are public too.

November 7, 2026: 8.72.1 was still the latest release, and even the newest canary, 8.72.2-alpha.11, declared >=4.8.4 <6.1.0 (checked with npm view). On GitHub Actions, on Ubuntu and Windows, 8.72.1 again stopped with typescript-eslint does not support TS 7.0. on plain 7.0.2, and ESLint passed with the side-by-side aliases (run).

— N.K., end of entry No.021

Useful? Pass it on:Post on XFollow @EmotionalMatter

Related entries

  1. No.015

    Fix: Cannot read properties of undefined (reading 'fileExists')

    ts-node or ts-loader crashing with "reading 'fileExists'" on TypeScript 7? Reproduced on Windows 11 and Ubuntu, before your code even runs: four ways out.

    > C:\project\node_modules\ts-node\dist\configuration.js:91

    FIXED5 min
  2. No.092

    TypeScript 7.1 beta tested: ts-jest, ESLint, NestJS, Angular

    On TypeScript 7.1.0-beta, ts-jest, typescript-eslint, ts-node and TypeDoc failed exactly as on 7.0, and so did NestJS, Angular, vue-tsc, svelte-check and astro check. The beta does ship a compiler API, but at new entry points (typescript/sync and typescript/async) that no tool uses yet. The side-by-side setup with TypeScript 6 fixed every one I re-ran.

    TESTED4 min
  3. No.029

    TypeScript 7 migration guide: breaking changes, tested

    Every option TypeScript 6.0.3 marked as deprecated was a hard error on 7.0.2, and ignoreDeprecations no longer silences it. Two defaults that arrived in 6.0 (strict on, @types not loaded automatically) also break projects coming straight from 5.9.

    TESTED7 min

tip: paste the exact error text