/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
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 tscOutput · 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:
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 tscOutput · 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… | module | moduleResolution |
|---|---|---|
| built by Vite, webpack, esbuild, Bun, Next.js | esnext (or preserve) | bundler |
| run by Node.js as ESM or CommonJS | nodenext | nodenext |
| a library published to npm | nodenext | nodenext |
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
Related pages
config · typescripttsconfig moduleResolution: bundler, nodenext, node16moduleResolution tells tsc how to find imports. TypeScript 7 accepts bundler, node16 and nodenext; node10 and classic were removed. Valid pairs with module.errors · pythonModuleNotFoundError: No module named '…'Python raises ModuleNotFoundError when the package is not installed for the interpreter that runs your code. Check sys.executable, then install with -m pip.compare · javascript== vs === in JavaScript: loose vs strict equality=== compares value and type without conversion; == converts types first, so 0 == '' and null == undefined are true. When to use each, with results from Node.js.