🤖 fix: eliminate dev-server startup crash from tsgo/tsc-alias race#2612
Merged
ethanndickson merged 1 commit intomainfrom Feb 25, 2026
Merged
🤖 fix: eliminate dev-server startup crash from tsgo/tsc-alias race#2612ethanndickson merged 1 commit intomainfrom
ethanndickson merged 1 commit intomainfrom
Conversation
Replace parallel tsgo -w + tsc-alias -w watchers with sequential build-main-watch.js execution in non-Windows dev-server target. The parallel watchers caused nodemon to restart mid-alias-rewrite, producing transient 'Cannot find module @/node/config' crashes.
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
Fix the
make dev-serverstartup crash (Cannot find module '@/node/config') that occurs on every cold start on non-Windows platforms.Background
The non-Windows
dev-servertarget launchestsgo -wandtsc-alias -was independent parallel watchers. On startup, tsgo immediately rebuildsdist/with unresolved@/path aliases, and nodemon restarts the server after its 500ms delay — before tsc-alias finishes rewriting all ~415 files. This produces a transientMODULE_NOT_FOUNDcrash every time.The Windows
dev-servertarget already avoids this by usingscripts/build-main-watch.js, which runs tsgo → tsc-alias sequentially.Implementation
Replace the parallel watcher pair with a source-watching nodemon that executes the existing sequential
build-main-watch.jsscript on each change — the same approach Windows already uses. This is a one-line Makefile change (plus a comment).Validation
make build-mainpassesmake dev-serverstarts without theCannot find module '@/node/config'crashGenerated with
mux• Model:anthropic:claude-opus-4-6• Thinking:xhigh• Cost:$2.23