Skip to content

reactProductionProfiling: true isn't working when experimental.reactCompiler: true #68276

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
stipsan opened this issue Jul 29, 2024 · 2 comments
Labels
bug Issue was opened via the bug report template.

Comments

@stipsan
Copy link
Contributor

stipsan commented Jul 29, 2024

Link to the code that reproduces this issue

https://github.com/sanity-io/nextjs-react-compiler-production-profiling-reproduction

To Reproduce

  1. Run pnpm install to get the same deps.
  2. Run next in production mode next build && next start.

Current vs. Expected behavior

When I try to run the profiler, I expect it to be available:
image

Instead I see this warning:
image

I also expect to be able to log window.profileResults and see data, instead it's undefined.

When running next dev I'm able to run the profiler, as well as see data on window.profileResults.

There is a test deploy you can use: https://nextjs-react-compiler-production-profiling-reproduction.sanity.dev/

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 23.4.0: Fri Mar 15 00:10:42 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T6000
  Available memory (MB): 32768
  Available CPU cores: 10
Binaries:
  Node: 20.11.1
  npm: 10.5.2
  Yarn: 1.22.19
  pnpm: 9.6.0
Relevant Packages:
  next: 15.0.0-canary.88 // Latest available version is detected (15.0.0-canary.88).
  eslint-config-next: 15.0.0-canary.88
  react: 19.0.0-rc-14a4699f-20240725
  react-dom: 19.0.0-rc-14a4699f-20240725
  typescript: 5.3.3
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

Developer Experience, Documentation, Instrumentation

Which stage(s) are affected? (Select all that apply)

next build (local), next start (local), Vercel (Deployed), Other (Deployed)

Additional context

I've tested against different canaries and the RC of v15, and haven't found a version where reactProductionProfiling: true seem to be working 🤔

@stipsan stipsan added the bug Issue was opened via the bug report template. label Jul 29, 2024
@github-actions github-actions bot added Developer Experience Documentation Related to Next.js' official documentation. Instrumentation Related to Next.js Instrumentation. labels Jul 29, 2024
@huozhi huozhi removed Documentation Related to Next.js' official documentation. Instrumentation Related to Next.js Instrumentation. labels Aug 20, 2024
@tom-sherman
Copy link

tom-sherman commented Apr 27, 2025

Even with reactCompiler disabled I cannot turn profiling on with reactProductionProfiling. Workaround for now is passing --profile to next build.

Can you update the issue title?

@tom-sherman
Copy link

It's also a webpack-specific issue, doing next build --turbpack enables profiling with reactProductionProfiling: true.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue was opened via the bug report template.
Projects
None yet
Development

No branches or pull requests

4 participants