Run TypeScript via Node 24 type stripping instead of a build step#56
Merged
Conversation
Drop the vite build and run src/main.ts directly with node, which strips types natively on Node 24. tsconfig switches to noEmit typecheck-only with allowImportingTsExtensions and erasableSyntaxOnly; relative imports now carry explicit .ts extensions. Bump Node to 24 across engines, Dockerfile, CI, and .nvmrc, and remove the build step from the Dockerfile and CI.
rektdeckard
approved these changes
Jun 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Removes the bundler/compile step and runs the TypeScript entrypoint directly with Node 24's built-in type stripping.
package.json):dev/startnow runnode src/main.ts …directly; removed thebuild(vite) andcleanscripts and thevitedevDependency. Bumpedengines.nodeto>=24.0.0and@types/nodeto^24. Deletedvite.config.ts.tsconfig.json): switched tonoEmittypecheck-only; addedallowImportingTsExtensions(Node requires explicit.tsimport specifiers) anderasableSyntaxOnly(rejects TS syntax Node can't strip).tsc --noEmitremains the type gate../agent→./agent.ts).node:22→node:24; removed thepnpm buildstep.tests.yml): Node matrix22→24; removed the "Build project" step..nvmrc→24.How it works
LiveKit's worker forks a published
.jsloader that dynamicallyimport()s the agent file, so on Node 24 the agent's.tsis type-stripped automatically — noexecArgv/loader wiring needed.Verification
pnpm run typecheck/lint/format:checkall pass.node src/main.ts devboots fully: inference runners initialize in the forked subprocess, connect to LiveKit Cloud, and register the worker.