Symptom
The macOS Intel (x64) build fails immediately on launch with a main-process dialog:
A JavaScript error occurred in the main process
Uncaught Exception:
Error: Could not load the "sharp" module using the darwin-x64 runtime
at Object.<anonymous> (/Applications/Power Interview AI.app/Contents/Resources/
app.asar/node_modules/sharp/lib/sharp.js:120:9)
at Object.<anonymous> (.../app.asar/node_modules/sharp/lib/constructor.js:10:1)
Affects Power.Interview.AI-1.6.0.dmg / -mac.zip (x64). The app is unusable - sharp is
imported at startup by src/main/services/suggestion-action.service.ts, so the crash happens
before the window appears.
Root cause
Two independent packaging defects.
1. The darwin-x64 binary was never installed. pnpm 10+ materialises only the host
architecture's optional dependencies. release.yml builds on macos-latest, which is arm64,
but electron-builder --mac packages both architectures from that one node_modules. So
@img/sharp-darwin-x64 was never on disk and the x64 artifact shipped without it. The build
succeeds and uploads clean - nothing fails until a user launches it.
2. sharp was never unpacked from the asar. Its native .node locates libvips in a
sibling package through an @rpath (@loader_path/../../sharp-libvips-darwin-<arch>/lib),
and dlopen cannot read a dylib from inside an asar. This would have broken arm64 too; the
x64 build just failed earlier, at the require.
Why CI did not catch it
Nothing in the pipeline launches or inspects the packaged artifact. ci.yml runs lint, tsc,
the renderer build and test:main - all of which pass on a build that crashes on launch.
Additionally
.github/release_notes_template.md pointed every macOS user at the -arm64.dmg, so Intel
users were handed a build their machine cannot run at all.
Symptom
The macOS Intel (x64) build fails immediately on launch with a main-process dialog:
Affects
Power.Interview.AI-1.6.0.dmg/-mac.zip(x64). The app is unusable -sharpisimported at startup by
src/main/services/suggestion-action.service.ts, so the crash happensbefore the window appears.
Root cause
Two independent packaging defects.
1. The darwin-x64 binary was never installed. pnpm 10+ materialises only the host
architecture's optional dependencies.
release.ymlbuilds onmacos-latest, which is arm64,but
electron-builder --macpackages both architectures from that onenode_modules. So@img/sharp-darwin-x64was never on disk and the x64 artifact shipped without it. The buildsucceeds and uploads clean - nothing fails until a user launches it.
2.
sharpwas never unpacked from the asar. Its native.nodelocates libvips in asibling package through an
@rpath(@loader_path/../../sharp-libvips-darwin-<arch>/lib),and
dlopencannot read a dylib from inside an asar. This would have broken arm64 too; thex64 build just failed earlier, at the
require.Why CI did not catch it
Nothing in the pipeline launches or inspects the packaged artifact.
ci.ymlruns lint,tsc,the renderer build and
test:main- all of which pass on a build that crashes on launch.Additionally
.github/release_notes_template.mdpointed every macOS user at the-arm64.dmg, so Intelusers were handed a build their machine cannot run at all.