[Bug][NixOS] rc.7 dsh web crashes because disabled HMR is recreated without loader internals #3494
Replies: 3 comments
|
The rc.7 clean-Nix repro is useful: a Your NODE_OPTIONS=--expose-internals dsh web --host 127.0.0.1 --port 3080 --no-openOn NixOS, wrapping the |
|
Reproduced on my machine — same version and same environment family:
Confirming the root cause in isolation — the native-addon fallback probe fails on the Nix-built binary: So One correction to the workaround above: This also means a plain |
|
Thanks @sysarcher — that's a real correction, not a nit. I just rechecked: node --expose-internals <path-to-@deepseek-ai/dsh/lib/bin.js> web --host 127.0.0.1 --port 3080 --no-open
The durable fixes remain the ones in the OP: do not recreate a |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Summary
On a fresh NixOS user state, the documented
dsh webcommand from the official npm release exits before the Web UI becomes available:This is an independent reproduction of the same failure family reported in #1873, #690, #1276, and #752. This report adds a clean
rc.7reproduction on Nix-built Node.js 24.19.0, with no historical DSH configuration imported.Environment
x86_64-linux, glibcv24.19.0@deepseek-ai/dsh@0.1.0-rc.7from the official npm registry@deepseek-ai/cordis-plugin-hmr@1.0.16@deepseek-ai/cordis-plugin-loader@1.0.2~/.dsh; no historical DSH state importedReproduction
Observed result:
127.0.0.1:3080never becomes reachable.Configuration evidence
The shipped default configuration reports the HMR row as disabled:
The Web bundle also documents the intent explicitly:
However, the post-boot path in
apps/cli/src/profile-boot.tscreates a new watch-only HMR instance wheneverctx.get('hmr')is undefined. A deliberately disabled row therefore becomes absence of the service, which triggers recreation:On this Nix-built Node binary, loader internals are unavailable through the flag-free fallback, and the recreated HMR constructor fails hard. This matches the detailed root-cause analysis in #1873 and #752.
Clarification and verified temporary workaround
This is not evidence that a Nix-built Node binary is generally unable to run DSH. The Web application itself starts successfully when Node exposes the loader internals before loading DSH. The incompatibility is narrower: the current flag-free/native fallback used by the recreated HMR service cannot obtain those internals on this Node build.
I verified the following command shape using the installed package's real
lib/bin.jspath:Verified result on the environment above:
dsh web: http://127.0.0.1:3080and remained running./returned status200.text/html; charset=utf-8with a non-empty Web UI document (14,549 bytes).--expose-internals is requiredfailure did not occur.This is a diagnostic workaround, not a proposed permanent requirement:
--expose-internalsexposes unsupported Node internals and must be supplied as a Node startup option before the DSH JavaScript entry point. The normaldsh web ...launcher still fails in the same clean environment.Expected behavior
The documented command should start the Web UI on a supported NixOS/Node environment without requiring an undocumented manual launcher.
Any of these upstream changes would resolve the boot failure safely:
Suggested acceptance test:
dsh web --host 127.0.0.1 --port 3080 --no-openfrom a fresh user state.http://127.0.0.1:3080becomes reachable without modifying the shipped profile or injecting an undocumented workaround.Related reports
Thank you for releasing DSH as open source. I hope this additional clean reproduction and acceptance test help prioritize a robust fix for NixOS and other source-built Node environments.
All reactions