Enum in types.d.ts used in useState hook crashes turbopack #72369
Labels
bug
Issue was opened via the bug report template.
linear: turbopack
Confirmed issue that is tracked by the Turbopack team.
Turbopack
Related to Turbopack with Next.js.
Link to the code that reproduces this issue
https://github.com/TijanaMazinjanin/nextjs_enum_bug
To Reproduce
You will see turbopack crashing.
Current vs. Expected behavior
The code should work the same with or without the --turbo flag. However, it currently crashes when --turbo is enabled, while it runs as expected without it.
Provide environment information
Operating System: Platform: win32 Arch: x64 Version: Windows 11 Pro Available memory (MB): 15707 Available CPU cores: 16 Binaries: Node: 22.6.0 npm: N/A Yarn: N/A pnpm: 9.7.0 Relevant Packages: next: 14.2.16 // An outdated version detected (latest is 15.0.2), upgrade is highly recommended! eslint-config-next: N/A react: 18.3.1 react-dom: 18.3.1 typescript: 5.6.3 Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
Turbopack
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
When I define enum in any other file except types.d.ts it's working. Latest nextjs 15.0.2 has the same issue. Linux distributions also have this issue.
The text was updated successfully, but these errors were encountered: