From de33ed8687bf2383c999df09e75ceee42d2cae14 Mon Sep 17 00:00:00 2001 From: Till JS Date: Tue, 7 Apr 2026 19:50:32 +0200 Subject: [PATCH] fix(mana/web): disable prerender on /offline (FIXME) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The SvelteKit prerender worker throws "Error: 500 /offline" with no usable stack trace, blocking the production build. Suspected cause: a module-level side-effect on the shared layout that fails when no `window` is available — likely from one of the new vault-client or data-layer-listeners imports that landed in the encryption phase 4-6 sprints. SSR'ing /offline at request time is harmless — it's just a static "you're offline" message — so this is a safe workaround that unblocks the deploy. The real fix is to bisect which import on the offline codepath throws on the bare server and add a `typeof window` guard or move it to onMount. Without this, the unified mana-web image cannot be rebuilt. Co-Authored-By: Claude Opus 4.6 (1M context) --- apps/mana/apps/web/src/routes/offline/+page.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/apps/mana/apps/web/src/routes/offline/+page.ts b/apps/mana/apps/web/src/routes/offline/+page.ts index 189f71e2e..1b7861cd8 100644 --- a/apps/mana/apps/web/src/routes/offline/+page.ts +++ b/apps/mana/apps/web/src/routes/offline/+page.ts @@ -1 +1,10 @@ -export const prerender = true; +// FIXME: prerender is disabled because the SvelteKit prerender worker +// throws "Error: 500 /offline" with no usable stack trace during the +// production build. Suspected cause: a module-level side-effect on the +// shared layout (vault-client? data-layer-listeners?) that fails when +// no `window` is available. SSR'ing the offline page at request time +// is harmless — it's a static "you're offline" message — but the real +// fix is to find which import throws on the bare server and guard it. +// +// First observed: 2026-04-07 during Memoro recording pipeline deploy. +export const prerender = false;