Skip to content

/errors/typescript/ts5108-moduleresolution-node10-removed

error TS5108: Option 'moduleResolution=node10' has been removed

verified onenvironmentlocal · windows 10.0.26200 arm64 · GNU bash 5.3.15 (Git Bash) · v24.20.0updated 2026-10-20
tool
TypeScript
exit code
1
versions
TypeScript 7.0+
os
any

TypeScript 7 removed the node (alias node10) and classic values of compilerOptions.moduleResolution. A tsconfig.json that still uses them fails with error TS5108 and exit status 1. Replace the value with bundler or nodenext.

Reproduce the error

bash
npm init -y >/dev/null
npm install --silent --no-audit --no-fund typescript@7.0.2 >/dev/null 2>&1
echo 'export const x: number = 1;' > a.ts
echo '{ "compilerOptions": { "module": "esnext", "moduleResolution": "node", "noEmit": true } }' > tsconfig.json
npx tsc

Output · exit 1

tsconfig.json(1,64): error TS5108: Option 'moduleResolution=node10' has been removed. Please remove it from your configuration.

The same configuration on TypeScript 6 fails with a deprecation error that can still be silenced:

bash
npm init -y >/dev/null
npm install --silent --no-audit --no-fund typescript@6.0.3 >/dev/null 2>&1
echo 'export const x: number = 1;' > a.ts
echo '{ "compilerOptions": { "module": "esnext", "moduleResolution": "node", "noEmit": true } }' > tsconfig.json
npx tsc

Output · exit 2

tsconfig.json(1,64): error TS5107: Option 'moduleResolution=node10' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
  Visit https://aka.ms/ts6 for migration information.

Fix: pick the resolution mode that matches how the code runs

Your code is…modulemoduleResolution
built by Vite, webpack, esbuild, Bun, Next.jsesnext (or preserve)bundler
run by Node.js as ESM or CommonJSnodenextnodenext
a library published to npmnodenextnodenext
bash
npm init -y >/dev/null
npm install --silent --no-audit --no-fund typescript@7.0.2 >/dev/null 2>&1
echo 'export const x: number = 1;' > a.ts
echo '{ "compilerOptions": { "module": "esnext", "moduleResolution": "bundler", "noEmit": true } }' > tsconfig.json
npx tsc && echo "tsc: no errors"

Output

tsc: no errors

FAQ

Why did this work in TypeScript 6?

TypeScript 6.0 deprecated node10 and classic with error TS5107, which could be silenced with "ignoreDeprecations": "6.0". TypeScript 7.0 removed the options, so there is nothing left to silence.

Is "node" the same as "node10"?

Yes. "node" is the older alias of "node10", and TypeScript reports both as node10.

Sources