Area
Build, CI, or release tooling
Steps to reproduce
- Install T3 Code (Nightly)
0.0.29-nightly.20260708.758 on macOS arm64 (Apple Silicon).
- Launch it.
Or from a clean checkout at the .758 commit (0c6656585):
pnpm install
node scripts/build-desktop-artifact.ts --platform mac --target dir --arch arm64
npx @electron/asar list "<built .app>/Contents/Resources/app.asar" | grep ffi-rs → ffi-rs is present, but its platform-specific optional dep is missing:
ls "<built .app>/Contents/Resources/app.asar.unpacked/node_modules/@yuuang/" → No such file or directory
Expected behavior
App launches and opens a window.
Actual behavior
The backend child process crash-loops at startup (code=1) and no renderer is ever spawned — dock icon appears but no window opens. The backend dies on:
Error: Cannot find module '@yuuang/ffi-rs-darwin-arm64'
Require stack:
- /Applications/T3 Code (Nightly).app/Contents/Resources/app.asar/node_modules/ffi-rs/index.js
@yuuang/ffi-rs-darwin-arm64 (the native binary for ffi-rs, an optional platform-gated dependency) is dropped from the packaged app — the entire app.asar.unpacked/node_modules/@yuuang/ directory is absent.
Root cause (analysis)
This is the follow-on to #3789 / #3790, one dependency deeper.
Confirmed by diffing the shipped bundles:
| Build |
Relative to #3772 |
@yuuang/ffi-rs-darwin-arm64/ffi-rs.darwin-arm64.node in asar.unpacked |
.751 |
before |
✅ present |
.758 |
after (+ #3790) |
❌ absent |
The dep is correctly declared in pnpm-lock.yaml (@yuuang/ffi-rs-darwin-arm64@1.3.2 as an optional of ffi-rs@1.3.2), so this is a bundling/collection gap for optional native deps, not a missing declaration.
Impact
Blocks work completely
Version or commit
0.0.29-nightly.20260708.758 (0c6656585)
Environment
macOS (Apple Silicon / arm64), Darwin 25.5.0
Logs or stack traces
{"message":"backend child process output","level":"ERROR","annotations":{"component":"desktop-backend-child","stream":"stderr",
"text":"Error: Cannot find module '@yuuang/ffi-rs-darwin-arm64'\nRequire stack:\n- .../app.asar/node_modules/ffi-rs/index.js\n
at Module._resolveFilename (node:internal/modules/cjs/loader:1483:15) ..."}}
Observed ~412 times (backend exits code=1 and respawns).
Workaround
Roll back to a nightly before #3772 (e.g. .751) and block auto-update:
launchctl setenv T3CODE_DISABLE_AUTO_UPDATE 1 before relaunch.
Area
Build, CI, or release tooling
Steps to reproduce
0.0.29-nightly.20260708.758on macOS arm64 (Apple Silicon).Or from a clean checkout at the
.758commit (0c6656585):pnpm installnode scripts/build-desktop-artifact.ts --platform mac --target dir --arch arm64npx @electron/asar list "<built .app>/Contents/Resources/app.asar" | grep ffi-rs→ffi-rsis present, but its platform-specific optional dep is missing:ls "<built .app>/Contents/Resources/app.asar.unpacked/node_modules/@yuuang/"→ No such file or directoryExpected behavior
App launches and opens a window.
Actual behavior
The backend child process crash-loops at startup (
code=1) and no renderer is ever spawned — dock icon appears but no window opens. The backend dies on:@yuuang/ffi-rs-darwin-arm64(the native binary forffi-rs, an optional platform-gated dependency) is dropped from the packaged app — the entireapp.asar.unpacked/node_modules/@yuuang/directory is absent.Root cause (analysis)
This is the follow-on to #3789 / #3790, one dependency deeper.
pnpm@10.24.0 → 11.10.0. pnpm ≥ 10.29.3 reports deduped deps differently (Regression in pnpm 10.29.3 with Electron packaging (transitive dependency missing at runtime) pnpm/pnpm#10601), and the electron-builder pnpm module collector silently drops those deps fromapp.asar.26.8.1 → 26.15.6, which restored the deduped prod deps (fixed thefast-checkcrash from [Bug]: Nightly won't launch: Cannot find package 'fast-check' (app.asar missing ~40 transitive deps) #3789).ffi-rs's optional native dep@yuuang/ffi-rs-darwin-arm64is still not collected into the asar, so.758(which includes fix(release): bump electron-builder so pnpm 11 deduped deps land in the asar #3790) crashes on it instead. The collection fix didn't cover platform-gatedoptionalDependencies.Confirmed by diffing the shipped bundles:
@yuuang/ffi-rs-darwin-arm64/ffi-rs.darwin-arm64.nodein asar.unpacked.751.758The dep is correctly declared in
pnpm-lock.yaml(@yuuang/ffi-rs-darwin-arm64@1.3.2as an optional offfi-rs@1.3.2), so this is a bundling/collection gap for optional native deps, not a missing declaration.Impact
Blocks work completely
Version or commit
0.0.29-nightly.20260708.758(0c6656585)Environment
macOS (Apple Silicon / arm64), Darwin 25.5.0
Logs or stack traces
Observed ~412 times (backend exits
code=1and respawns).Workaround
Roll back to a nightly before #3772 (e.g.
.751) and block auto-update:launchctl setenv T3CODE_DISABLE_AUTO_UPDATE 1before relaunch.