nextjs - 💡(How to fix) Fix Core dump when using imported enums in server page

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

The dev server exits unexpectedly with code 0 without reporting any error, and the build process core dumps.

Code Example

npx create-next-app@latest next-test
cd next-test

---

type Value = 1 | 2;
export enum Foo {
  BAR = 1 satisfies Value, // fails
  // BAR = 1 satisfies Value  
  // BAR = 1 // works?
}

---

import { Foo } from "./constants";
export default function Home() {
  return <div>{Foo.BAR}</div> // fails
  // return "Works"; // works
}

---

Operating System:
  Platform: linux
  Arch: x64
  Version: #37~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Nov 20 10:25:38 UTC 2
  Available memory (MB): 15770
  Available CPU cores: 12
Binaries:
  Node: 22.14.0
  npm: 10.9.2
  Yarn: N/A
  pnpm: 10.33.2
Relevant Packages:
  next: 16.2.7 // Latest available version is detected (16.2.7).
  eslint-config-next: N/A
  react: 19.2.4
  react-dom: 19.2.4
  typescript: 5.9.3
Next.js Config:
  output: N/A

----------

Operating System:
  Platform: linux
  Arch: arm64
  Version: #1 SMP PREEMPT Debian 1:6.12.75-1+rpt1 (2026-03-11)
  Available memory (MB): 3797
  Available CPU cores: 4
Binaries:
  Node: 24.12.0
  npm: 11.6.2
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  next: 16.2.7 // Latest available version is detected (16.2.7).
  eslint-config-next: N/A
  react: 19.2.4
  react-dom: 19.2.4
  typescript: 5.9.3
Next.js Config:
  output: N/A
RAW_BUFFERClick to expand / collapse

Link to the code that reproduces this issue

https://github.com/sandbox-0acf4/core-dump-enums-reprod

To Reproduce

  1. Create a new project using recommended defaults
npx create-next-app@latest next-test
cd next-test
  1. Create app/constants.ts
type Value = 1 | 2;
export enum Foo {
  BAR = 1 satisfies Value, // fails
  // BAR = 1 satisfies Value  
  // BAR = 1 // works?
}
  1. Edit app/page.tsx
import { Foo } from "./constants";
export default function Home() {
  return <div>{Foo.BAR}</div> // fails
  // return "Works"; // works
}
  1. run pnpm dev or pnpm build

Current vs. Expected behavior

The dev server exits unexpectedly with code 0 without reporting any error, and the build process core dumps. I discovered this issue while exporting an enum of a similar type (e.g. enum OpType { CREATE = 1 satisfies OpKind, ... }) within a similar but slightly more involved setup.

<img width="1056" height="709" alt="Image" src="https://github.com/user-attachments/assets/233ae31a-065f-4423-9a05-f6a2870586fc" />

I tried it on a Raspberry Pi 4 as well, where I encountered a similar issue, but instead got a Trace/breakpoint trap.

Provide environment information

Operating System:
  Platform: linux
  Arch: x64
  Version: #37~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Nov 20 10:25:38 UTC 2
  Available memory (MB): 15770
  Available CPU cores: 12
Binaries:
  Node: 22.14.0
  npm: 10.9.2
  Yarn: N/A
  pnpm: 10.33.2
Relevant Packages:
  next: 16.2.7 // Latest available version is detected (16.2.7).
  eslint-config-next: N/A
  react: 19.2.4
  react-dom: 19.2.4
  typescript: 5.9.3
Next.js Config:
  output: N/A

----------

Operating System:
  Platform: linux
  Arch: arm64
  Version: #1 SMP PREEMPT Debian 1:6.12.75-1+rpt1 (2026-03-11)
  Available memory (MB): 3797
  Available CPU cores: 4
Binaries:
  Node: 24.12.0
  npm: 11.6.2
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  next: 16.2.7 // Latest available version is detected (16.2.7).
  eslint-config-next: N/A
  react: 19.2.4
  react-dom: 19.2.4
  typescript: 5.9.3
Next.js Config:
  output: N/A

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

Runtime

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

next dev (local) next build (local)

Additional context

I also tried webpack giving me either a SIGILL or SIGTRAP when running pnpm build --webpack or npm run build -- --webpack on each of my machines.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING