Uh oh!
There was an error while loading. Please reload this page.
fix(dev): run esbuild through its JS API — bin/esbuild is a native binary - #484
Merged
Conversation
…nary npm run dev crashed on any machine where esbuild's postinstall had run: dev.mjs spawned `node node_modules/esbuild/bin/esbuild`, but postinstall replaces that file with a platform-native executable (Mach-O on darwin), so node threw SyntaxError on byte one and the preload/main bundles never built. Both esbuild invocations now use the JS API (esbuildBuild with equivalent options: bundle/platform/format/packages/external), which is binary-agnostic, cross-platform, and skips a child process. The dev-startup contract now asserts the API options instead of CLI flags, with the rationale inline. Verified: npm run dev boots end-to-end (incremental build 0.2s, vite on :5173, Electron launches). Desktop suite 1708/1708.
Astro-Han added a commit
that referenced
this pull request
Jul 3, 2026
5 CSS files (daily-review, health-center, permission-center, settings/connection, tool-stream) took main's format (@layer removal, indentation) and re-applied foreground alias replacement (40/50→muted-foreground, 60/70/80→foreground-secondary).
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 freeto 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.
npm run dev在任何跑过 esbuild postinstall 的机器上必挂:dev.mjs 用node node_modules/esbuild/bin/esbuild执行,但 postinstall 会把该文件替换为平台原生二进制(darwin 上是 Mach-O)→ node 在第一个字节就抛 SyntaxError,preload/main 永远构建不出来(#456 作者机器能跑大概率是装依赖时跳过了 scripts)。两处 esbuild 调用改为 JS API(
esbuildBuild等价参数):与二进制形态无关、跨平台、还省一个子进程。dev-startup 契约同步为断言 API 选项。验证:
npm run dev端到端跑通(增量构建 0.2s → vite :5173 → Electron 启动);1708/1708。