You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error: Cannot find module @rollup/rollup-darwin-arm64
[cause]: Error: dlopen(.../rollup.darwin-arm64.node, 0x0001): tried: ...
(code signature ... not valid for use in process:
mapping process and mapped file (non-platform) have different Team IDs)
同一套命令换成本机 node(nvm / Homebrew)立刻正常。
复现
# 用 DSH 内嵌的 node 加载任意 ad-hoc 签名的 .node
/Applications/DeepSeek\ Harness.app/Contents/Resources/runtime/primary-runtime/dependencies/node/bin/node \
-e "require('./node_modules/.pnpm/@rolldown+binding-darwin-arm64@1.2.3/node_modules/@rolldown/binding-darwin-arm64/rolldown-binding.darwin-arm64.node')"# → ERR_DLOPEN_FAILED ... have different Team IDs# 换本机 node~/.nvm/versions/node/v24.15.0/bin/node -e "…同上…"# → OK
English summary. The bundled node (runtime/primary-runtime/dependencies/node/bin/node) is signed with hardened runtime and only the allow-jit entitlement, while the app itself has com.apple.security.cs.disable-library-validation. Because of that, any child process spawned through that node cannot dlopen ad-hoc-signed native addons (rolldown/rollup used by vitest, sharp, better-sqlite3, …) and fails with different Team IDs. Adding disable-library-validation to jit-entitlements.plist and node-x64-entitlements.plist (or reusing the app's entitlements for node) fixes it. Reproduced on macOS 27.3 arm64 with DSH 0.2.2-rc.5; master and dsh-v0.2.3-alpha.2 still contain the same signing configuration.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
现象
在 DSH 终端里跑任何依赖原生插件的 JS 工具,一律
ERR_DLOPEN_FAILED:同一套命令换成本机 node(nvm / Homebrew)立刻正常。
复现
证据
app 自己可以加载 ad-hoc 签名的原生库,但它 spawn 出来的 node 子进程不行——它的 entitlements 里没有
com.apple.security.cs.disable-library-validation,于是 macOS library validation 拒绝加载任何没有相同 Team ID 的.node。签名来源就在仓库里:apps/desktop/scripts/macos-runtime.ts#L77-L82
而这两份 plist 都没有那项豁免:
disable-library-validationallow-jitallow-jit+allow-unsigned-executable-memory影响
pnpm test/vitest跑不起来(vite 8 → rolldown、vite 7 → rollup,两条链都要 dlopen 原生绑定);npm run test当门禁的流程都会因此永远红;纯 JS 的工具链(tsc / eslint / jscpd)不受影响,所以现象很像"只有测试坏了"。
建议修法
给内嵌 node 用的两份 plist 加上:
或者让内嵌 node 直接复用 app 那份
macos-entitlements.plist。app 已经开了这项豁免,只需要让子进程也拿到。环境
dsh-v0.2.3-alpha.2:jit-entitlements.plist仍是只有allow-jit,未修;PR 里也没有相关改动。English summary. The bundled node (
runtime/primary-runtime/dependencies/node/bin/node) is signed with hardened runtime and only theallow-jitentitlement, while the app itself hascom.apple.security.cs.disable-library-validation. Because of that, any child process spawned through that node cannotdlopenad-hoc-signed native addons (rolldown/rollup used byvitest, sharp, better-sqlite3, …) and fails withdifferent Team IDs. Addingdisable-library-validationto jit-entitlements.plist and node-x64-entitlements.plist (or reusing the app's entitlements for node) fixes it. Reproduced on macOS 27.3 arm64 with DSH 0.2.2-rc.5;masteranddsh-v0.2.3-alpha.2still contain the same signing configuration.All reactions