Tags: waigore/mux
Tags
🤖 fix: eliminate dev-server startup crash from tsgo/tsc-alias race (c… …oder#2612) ## Summary Fix the `make dev-server` startup crash (`Cannot find module '@/node/config'`) that occurs on every cold start on non-Windows platforms. ## Background The non-Windows `dev-server` target launches `tsgo -w` and `tsc-alias -w` as **independent parallel watchers**. On startup, tsgo immediately rebuilds `dist/` with unresolved `@/` path aliases, and nodemon restarts the server after its 500ms delay — before tsc-alias finishes rewriting all ~415 files. This produces a transient `MODULE_NOT_FOUND` crash every time. The Windows `dev-server` target already avoids this by using `scripts/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.js` script on each change — the same approach Windows already uses. This is a one-line Makefile change (plus a comment). ## Validation - `make build-main` passes - `make dev-server` starts without the `Cannot find module '@/node/config'` crash - Source file changes trigger sequential rebuild → clean server restart --- _Generated with `mux` • Model: `anthropic:claude-opus-4-6` • Thinking: `xhigh` • Cost: `$2.23`_ <!-- mux-attribution: model=anthropic:claude-opus-4-6 thinking=xhigh costs=2.23 -->
PreviousNext