What happened?
pi immediately crashes on startup with an uncatchable Rust panic when the @mariozechner/clipboard native addon is loaded. Windows clipboard (clip) fallback exists but never gets reached because the abort happens at module import time.
thread '<unnamed>' panicked at napi-sys-2.4.0\src\functions.rs:7:3:
Node-API symbol has not been loaded
thread caused non-unwinding panic. aborting.
The crash occurs in napi_register_module_v1 (compiled with panic = abort), so try-catch cannot intercept it.
Root cause: @mariozechner/clipboard was compiled with napi-sys 2.4.0, which on Windows loads N-API symbols from the host process via GetProcAddress. When Node.js is the MSYS2 ucrt64 build, the N-API symbols are not exported in a way MSVC-built .node files can resolve.
napi-rs has since fixed this upstream (napi-sys v3.1.0+) by switching to libloading for dynamic symbol resolution, but @mariozechner/clipboard has not been rebuilt with the fix.
Steps to reproduce
- Install MSYS2 ucrt64 environment and its
nodejs package
npm install -g --ignore-scripts @earendil-works/pi-coding-agent
pi --version
Expected behavior
pi should start without crashing. Clipboard can fall back to the existing platform-specific tools (clip on Windows) which are already implemented in clipboard.js.
Version
0.75.5
What happened?
piimmediately crashes on startup with an uncatchable Rust panic when the@mariozechner/clipboardnative addon is loaded. Windows clipboard (clip) fallback exists but never gets reached because the abort happens at module import time.The crash occurs in
napi_register_module_v1(compiled withpanic = abort), so try-catch cannot intercept it.Root cause:
@mariozechner/clipboardwas compiled withnapi-sys 2.4.0, which on Windows loads N-API symbols from the host process viaGetProcAddress. When Node.js is the MSYS2 ucrt64 build, the N-API symbols are not exported in a way MSVC-built.nodefiles can resolve.napi-rs has since fixed this upstream (
napi-sysv3.1.0+) by switching tolibloadingfor dynamic symbol resolution, but@mariozechner/clipboardhas not been rebuilt with the fix.Steps to reproduce
nodejspackagenpm install -g --ignore-scripts @earendil-works/pi-coding-agentpi --versionExpected behavior
pi should start without crashing. Clipboard can fall back to the existing platform-specific tools (
clipon Windows) which are already implemented inclipboard.js.Version
0.75.5