You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bun build --app panics with "Runtime file not found" for any custom Bake.Framework #32142
Loading configuration
Bundling routes
Rendering routes
panic(main thread): Runtime file not found. This is an unexpected bug in Bun. Please file a bug report on GitHub.
The client chunk (dist/_bun/<hash>.js) is written, then bun crashes.
Additional information
The bundler only populates OutputFile.bake_extra when is_built_in_react is true:
if (!c.framework.?.is_built_in_react) break :brk .{};
For any custom Bake.Framework, every chunk's bake_extra.bake_is_runtime therefore stays false, so maybe_runtime_file_index is never assigned, and src/runtime/bake/production.zig:448 panics.
framework: "react" does not hit this panic (it fails earlier on missing react-server-dom-bun deps, which is expected). The dev server (Bun.serve with app: via the default-export-as-server convention) works fine for custom frameworks — only bun build --app is affected.
The fix is presumably to drop the is_built_in_react gate (or at minimum still set bake_is_runtime for custom frameworks).
Activity
robobun commentedon Jun 11, 2026
Reproduced: the custom framework repro panics with "Runtime file not found" after "Rendering routes" (exit 132, no
dist/index.html).Fixed on main by #46021. On a build of 2a5cbbc the repro exits 0 and writes
dist/index.html.bake: reserve /_bun for prefixes, add the build output test as todo
bake: do not abort on a "use client" module without a separate SSR gr…
Hardening: fix crashes across the runtime, bundler, dev server, shell…