Repository navigation
Replies: 4 comments 1 reply
|
Same root cause here. NixOS, Node v24.16.0 (the nix source build, not the official tarball), and I get the exact same failure — One thing I'd add to the analysis: I don't think it's specifically a Node 24.18.x problem. I ran a quick A/B test on my machine — same addon, same Node version (24.16.0), same x86_64 — with the official prebuilt binary from nodejs.org vs the nix-compiled one. The official binary resolves The |
|
+1,补充一个第三种报错变体,进一步印证"这是 addon probe 对 V8 布局假设过窄", 环境与报错: Windows 11 (x64),Node 路径被指向了 Electron 内置的运行时 Unsupported/no-realm (no compatible GetAlignedPointerFromEmbedderData symbol found) (楼上两位分别是 no-getter / x64 sysv getter,这里是 no-realm / GetAlignedPointerFromEmbedderData) 同样是 catch {} 静默吞掉后,loader.internal 拿不到,进而: web 报 Cannot find package '@deepseek-ai/dsh-client-ui-directory-picker-native' 这已经不是"某一类 Node 构建"的问题了——"非官方构建的 Node(nix 源码编译、Electron 内置、其他 source-built)全都命中,而官方 tarball 正常",说明根因是 node-addon-require-builtin 0.1.4 |
|
BTW 以前的 cordis cli 是会启动一个node子进程然后注入 expose internal 的,我想 dsh 也可以 |
|
同根因的 macOS + Nix 复现与机器码级定位见 #690 的回复:Node 由 Nix 源码构建时 addon 探测失败,在 0.2.0-rc.2 已升级为 boot 阶段致命崩溃,且换任何 Node 版本均无效。 |
Uh oh!
There was an error while loading. Please reload this page.
pnpm dsh web/--profile headlessfail to boot from source on Node 24.18.1 —node-addon-require-builtinincompatible, silent fallback masks the root causeSummary
On Linux x64 with Node v24.18.1, booting any dsh profile from a clean source checkout fails at runtime.
dsh webdies withERR_MODULE_NOT_FOUND: Cannot find package '@deepseek-ai/dsh-client-ui-directory-picker-browse';dsh --profile headlessdies with--expose-internals is required for HMR service. Both symptoms share one root cause: the prebuiltnode-addon-require-builtin@0.1.4(linux-x64-gnu) binary is incompatible with Node 24.18.1, so the Cordis loader silently loses its internal ESM-loader handle.pnpm install,pnpm run clean && pnpm run build, and typecheck are all unaffected — this is runtime-only.Environment
47f943859b(clean tree)nodejs-slim-24.18.1), Linux x86_64, glibc~/.dsh/profiles— 198@deepseek-ai/*packages present there, including the "missing" picker, so the profile install itself is completeSymptoms
pnpm dsh web:pnpm dsh --profile headless "say hi":Root cause
eb0cc4eb18("refactor: drop obsolete expose-internals flag") removed--expose-internalsfrom the launch path. The replacement mechanism isnode-addon-require-builtin:requireInternalinvendor/loader/src/internal.tsuses it to reachinternal/modules/esm/loaderwithout the flag.On Node 24.18.1 the addon loads, but
requireBuiltinfails at runtime:Minimal repro:
createRequirefromvendor/loader, thenrequire('node-addon-require-builtin').requireBuiltin('internal/modules/esm/loader').requireInternalswallows that failure (catch {}), soModuleLoader.fromInternal()returnsundefinedandctx.loader.internalis never set. Two downstream behaviors then degrade independently:web) —EntryTree.import(vendor/loader/src/config/tree.ts) falls back frominternal.import(name, baseUrl)to a bareimport(name)anchored at the loader module. Under the tsx source launch that resolves throughtsconfig.base.jsonpaths, and the two directory-picker client packages have no explicit entries there: their package-name suffixclient-ui-directory-picker-*doesn't match their directorypackages/client/ui-directory-picker-*, so thedsh-*wildcard can't derive them (every other client-ui package has an explicit row; the two pickers were missed). HenceERR_MODULE_NOT_FOUND.headless, andwebonce the above is fixed) — both bundles disable the sharedhmrrow, soapps/cli/src/profile-boot.tsmounts a watch-onlycordis-plugin-hmrpost-boot to keep profile patch layers live. Its constructor requiresctx.loader.internaland throws.Workaround (validated)
Pass the flag directly to node — it is rejected in
NODE_OPTIONS("--expose-internals is not allowed in NODE_OPTIONS"):node --expose-internals --import tsx/esm apps/cli/src/bin.ts web node --expose-internals --import tsx/esm apps/cli/src/bin.ts --profile headless "task"With the flag,
requireInternaltakes its first branch and bypasses the addon entirely:webserves on http://127.0.0.1:3080, andheadlessboots to the expectedMISSING_CREDENTIALprompt (no API key configured). Locally, restoring it in the root script is a one-line stopgap:Latent gaps found along the way
tsconfig.base.jsonpathslacks explicit entries for@deepseek-ai/dsh-client-ui-directory-picker-browseand-native(plus their/*subpaths, mirroring the host pickers). Reachable only when loader internals are unavailable, but it converts an addon incompatibility into a confusing module-not-found far from the cause.catch {}inrequireInternalmakes an environment incompatibility silent. A one-line diagnostic ("node-addon-require-builtin unavailable; loader internals disabled") would turn this from a long diagnosis into an obvious one.verify-cordis-configgates cordis.yml specifiers against the tsconfig paths map, but runtimeloader.create()specifiers (e.g. the picker'sSURFACE_PACKAGES) are not covered — nothing failed a gate here; actually booting a profile was the only detector.Questions
node-addon-require-builtin@0.1.4expected to work on Node 24.18.x? 0.1.4 is the latest on npm (published 2026-08-03). If a fixed release is coming, restoring--expose-internalsis a fine stopgap; otherwise the flag (or a launcher re-exec with it) may need to come back for source launches.dsh web/headlessfrom source on? Since this breaks booting any profile from source, it looks like the profile-boot path isn't exercised on an affected Node version.All reactions