Summary
Windows nightly desktop builds can launch the Electron shell but never open the main app window because the packaged backend crash-loops before readiness.
The backend stderr in %USERPROFILE%\.t3\userdata\logs\server-child.log shows:
Error: Cannot find module '@yuuang/ffi-rs-win32-x64-msvc'
Require stack:
- ...\resources\app.asar\node_modules\ffi-rs\index.js
Environment
- OS: Windows
- App: T3 Code nightly desktop build
- Backend Node:
v24.15.0
Root Cause
Current main includes @ff-labs/fff-node in apps/server, which depends on ffi-rs.
ffi-rs resolves its platform binary through optional dependencies, including:
@yuuang/ffi-rs-win32-x64-msvc
The desktop artifact build stages production dependencies with:
vp install --prod --no-optional
That excludes the native optional package from the packaged app. On Windows, ffi-rs then fails at startup, the backend exits with code 1, and the desktop window is never created because backend readiness is never reached.
Expected Behavior
The Windows desktop package includes the native optional dependency needed by ffi-rs, so the backend reaches readiness and the main window opens.
Actual Behavior
The backend repeatedly exits with MODULE_NOT_FOUND for @yuuang/ffi-rs-win32-x64-msvc.
Suggested Fix
Do not pass --no-optional when installing staged desktop production dependencies. Platform-native optional packages are required runtime dependencies for packages like ffi-rs.
Summary
Windows nightly desktop builds can launch the Electron shell but never open the main app window because the packaged backend crash-loops before readiness.
The backend stderr in
%USERPROFILE%\.t3\userdata\logs\server-child.logshows:Environment
v24.15.0Root Cause
Current
mainincludes@ff-labs/fff-nodeinapps/server, which depends onffi-rs.ffi-rsresolves its platform binary through optional dependencies, including:@yuuang/ffi-rs-win32-x64-msvcThe desktop artifact build stages production dependencies with:
That excludes the native optional package from the packaged app. On Windows,
ffi-rsthen fails at startup, the backend exits with code 1, and the desktop window is never created because backend readiness is never reached.Expected Behavior
The Windows desktop package includes the native optional dependency needed by
ffi-rs, so the backend reaches readiness and the main window opens.Actual Behavior
The backend repeatedly exits with
MODULE_NOT_FOUNDfor@yuuang/ffi-rs-win32-x64-msvc.Suggested Fix
Do not pass
--no-optionalwhen installing staged desktop production dependencies. Platform-native optional packages are required runtime dependencies for packages likeffi-rs.