vercel / vercel/next.js

deprecated tsconfig settings are used as default (node10?)

Open
#82,017 4 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

create-next-app Linting TypeScript
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
  1. clone example, npm i
  2. 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
Image
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 CommonJS require. You probably won’t need to use node10 in 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.