Did anyone successfully package a NestJS app with pkg and SEA? #236
-
|
Hi, did anyone manage to package a NestJS app with pkg and SEA? If so, please let me know :) |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 20 replies
-
|
@julianpoemp could you tell me what kind of issues you faced doing this? |
Beta Was this translation helpful? Give feedback.
-
|
I created a minimal non-working example repository: https://github.com/julianpoemp/yao-pkg-nestjs-sea-example . The example contains just a fresh initialized NestJS project. Results: PKG without SEABuildable and executable. PKG with SEABuildable. Not executable. Build OutputRun OutputPKG with SEA EnhancedNot buildable. Output |
Beta Was this translation helpful? Give feedback.
-
|
Hi @julianpoemp, thanks for the minimal repro — I was able to reproduce and track down the root cause. Summary of findings and a fix in #247: Your two issues1. 2. Segfault on macOS arm64 after the devDeps fix — root cause is in pkg's SEA pipeline, specifically Fix in #247: split the SEA ad-hoc-sign path into its own helper that skips the Note on vanilla
|
Beta Was this translation helpful? Give feedback.
-
|
6.18.2 ships the fix 🎉 |
Beta Was this translation helpful? Give feedback.

Julian, that lldb trace is the answer. 🎯
The crash is inside
FindSingleExecutableResource— that's the SEA blob header parser, running before V8 is even initialized.ReadArithmetic<unsigned long>is reading an 8-byte length field from the blob and getting0x936c6f6734a0218fback — pure garbage, then used as a pointer →EXC_BAD_ACCESS.Translation: Node 22.22.2 cannot parse the SEA blob header tha…