deprecated tsconfig settings are used as default (node10?)
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 142k
- Forks
- 32.4k
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 351
Description
Link to the code that reproduces this issue
https://github.com/ldeveber/nextjs-tsconfig-example
To Reproduce
- clone example,
npm i - run
npm run lint(can cancel after output is shown)
❯ npm run lint 68% 08:41
> lint
> next lint
We detected TypeScript in your project and reconfigured your tsconfig.json file for you.
The following suggested values were added to your tsconfig.json. These values can be changed to fit your project's needs:
- lib was set to dom,dom.iterable,esnext
- allowJs was set to true
- noEmit was set to true
- incremental was set to true
- include was set to ['next-env.d.ts', '.next/types/**/*.ts', '**/*.ts', '**/*.tsx']
- plugins was updated to add { name: 'next' }
- exclude was set to ['node_modules']
The following mandatory changes were made to your tsconfig.json:
- esModuleInterop was set to true (requirement for SWC / babel)
- moduleResolution was set to node (to match webpack resolution)
- resolveJsonModule was set to true (to match webpack resolution)
- jsx was set to preserve (next.js implements its own optimized jsx transform)
? How would you like to configure ESLint? https://nextjs.org/docs/app/api-reference/config/eslint
Current vs. Expected behavior
CURRENT BEHAVIOR
Updates tsconfig.json with mandatory features including deprecated ones required by next.
EXPECTED BEHAVIOR
Updates tsconfig.json with mandatory features required by next, excluding deprecated features. According to https://www.typescriptlang.org/tsconfig/#moduleResolution
'node10'(previously called'node') for Node.js versions older than v10, which only support CommonJSrequire. You probably won’t need to usenode10in modern code.
Provide environment information
/bin/sh: yarn: command not found
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 24.5.0: Tue Apr 22 19:54:26 PDT 2025; root:xnu-11417.121.6~2/RELEASE_ARM64_T8112
Available memory (MB): 24576
Available CPU cores: 8
Binaries:
Node: 24.1.0
npm: 11.4.2
Yarn: N/A
pnpm: 10.13.1
Relevant Packages:
next: 15.4.2-canary.15 // Latest available version is detected (15.4.2-canary.15).
eslint-config-next: N/A
react: 19.1.0
react-dom: 19.1.0
typescript: 5.8.3
Next.js Config:
output: N/A
Which area(s) are affected? (Select all that apply)
TypeScript, Linting, create-next-app
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
I was trying to set up a new app, and I had skipped eslint because I had planned to add biome, but I forgot to change the command before I ran it and saw this by chance.
Note: I did not install the typescript 5.9 beta, but I wanted to surface this because its coming!
https://devblogs.microsoft.com/typescript/announcing-typescript-5-9-beta/
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked reproduction, run npm run lint, and inspect how next lint updates tsconfig.json. Trace the TypeScript configuration defaults used by the affected TypeScript, linting, or create-next-app entry point. Done means the generated configuration no longer uses the deprecated moduleResolution setting while preserving the required Next.js behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nextjs, typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100