react / react/react

[Compiler Bug]: healthcheck do not check next.js StrictMode

Open
#30,049 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Component: React Compiler Status: Unconfirmed Type: Bug
Dominant language
JavaScript
Stars
251k
Forks
51.4k
Avg merge
2d 4h
Merged PRs (30d)
53

Description

What kind of issue is this?
  • React Compiler core (the JS output is incorrect, or your app works incorrectly after optimization)
  • babel-plugin-react-compiler (build issue installing or using the Babel plugin)
  • eslint-plugin-react-compiler (build issue installing or using the eslint plugin)
  • react-compiler-healthcheck (build issue installing or using the healthcheck script)
Link to repro

https://github.com/coleea/bug-report-next15-server-action

Repro steps

just run command npx react-compiler-healthcheck@latest.
then, react-compiler-healthcheck does not check StrictMode even though Next.js is actually StrictMode.

Next.js is StrictMode by default under these two conditions are met

  1. Next.js version 13.4+
  2. App router

You can check this : https://rc.nextjs.org/docs/app/api-reference/next-config-js/reactStrictMode

So, It needs extra three steps to check whether StrictMode or Not.

  1. check package.json if Next.js version is over 13.4 or not.
  2. If so, Check if reactStrictMode: false is not set.
  3. check if project is App-Router-based.

If three conditions are met, this project is based on StrictMode even though reactStrictMode: true is not set on next.config.mjs file.

How often does this bug happen?

Every time

What version of React are you using?

19.0.0-rc.0

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 by running npx react-compiler-healthcheck@latest against the linked Next.js reproduction and inspect the healthcheck implementation that determines StrictMode. Verify how it detects Next.js version, reactStrictMode configuration, and App Router usage. Done means the command recognizes implicit StrictMode under the three stated conditions while preserving explicit opt-out behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nextjs, react
Domain
frontend, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.