Skip to content

Node full-site: compile the server, start with node, typecheck it - #15

Merged
amenophis1er merged 1 commit into
mainfrom
fix/node-site-start
Nov 15, 2026
Merged

amenophis1er merged 1 commit into
mainfrom
fix/node-site-start

Conversation

@amenophis1er

Copy link
Copy Markdown
Contributor

Fixes #12 and #13.

  • Build: astro build && tsc -p tsconfig.json. Start: node dist/src/server.js (was tsx src/server.ts).
  • server.ts loads Astro's handler with a typed dynamic import from the working directory (the static ../dist/server/entry.mjs import failed tsc with TS7016, and its relative path is wrong from dist/src/).
  • Node tsconfig includes only the entry points (src/server.ts, trokky.config.ts), so a site endpoint using import.meta.env or astro:* doesn't break the server build; astro check covers the site.
  • README: a "Run it in production" section for Node (build needs devDependencies; start from the project directory; npm run dev clears the compiled server).
  • Smoke: Node cases prune devDependencies before npm start with NODE_ENV=production; build failures print tsc's output.

Correction to #13: a Node full-site start was not actually dead on production installs today: tsx reaches production via astro → vite. The compiled start removes that dependency on an accident; the smoke's prune can't prove it, as the comment now says.

Smoke node-full, node-conference, node-api, node-studio, workers-full pass; 90 unit tests. Restoring the static import fails the build with TS7016. Reviewed by Codex (clean) and an executing reviewer (fixes applied: tsconfig include, README production steps, a vacuous test assertion, the cwd comment).

@amenophis1er
amenophis1er merged commit ba382e8 into main Nov 15, 2026
12 checks passed
@amenophis1er
amenophis1er deleted the fix/node-site-start branch November 15, 2026 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Node full-site projects are never typechecked, and do not typecheck

1 participant