Stu Mason
Stu Mason

Activity

StuMason/cleanconnect
TidyLinker.com
TypeScript
Pull Request Opened

PR #134 opened: fix: bundle SSR dependencies so the worker can boot

Summary

The SSR worker we just enabled in #133 immediately crashed at boot:

Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@inertiajs/react'
imported from /var/www/html/bootstrap/ssr/ssr.js

Vite's default SSR build leaves npm deps external — the bundle imports @inertiajs/react, react-dom/server, etc. at runtime from node_modules. The runtime image has no node_modules, so the worker dies, supervisor retries 3 times, gives up, and Inertia silently falls back to client-side rendering.

Setting ssr.noExternal: true tells Vite to inline all deps into the SSR bundle. Same approach as the working SSR setup in the progress repo.

Sentry: tidy-linker / staging — Inertia\Ssr\SsrException event ID ea3a881e554a4ee593f199780032ea7a

Test plan

  • Coolify dev deploy succeeds
  • No ssr FATAL in container logs after boot
  • curl https://dev.tidylinker.com/ (as Googlebot UA) returns rendered HTML inside <div id="app">…</div> with <h1> content and per-page meta description
  • Authenticated pages still hydrate correctly client-side
  • Once green: deploy to production
+3
additions
-0
deletions
1
files changed