Replies: 4 comments 1 reply
|
问题可能在v0.1.5-rc.2修复了,你可以试一试 |
|
清华软件开源镜像上的nodejs刚好就到v24.1.0,完美闪退导致我排查了三个小时。这个哥们用24.0的nodejs也遇到了同样的问题 #4047 |
|
Your root cause is exactly right, and I confirmed it with real Node binaries rather than by reading the source. Verified — and a bridge that works todayI reproduced this on real Node binaries and the real published CLI:
The exact availability boundary is 24.2.0 and 22.18.0 — not "24" as a whole; 24.0.x and 24.1.0 are affected too. Bridge:
npx dsh-node-compat web
# or: npm i -g dsh-node-compat && alias dsh=dsh-compatOn a runtime where the guard works it is completely silent; on one where it does not, it prints the diagnosis first. It never double-runs, because when the launcher is the main module The permanent fix is two lines upstream: replace the guard with a check that works on every supported runtime, and declare 已用真实环境验证,并提供一个今天就能用的桥我用真实 Node 二进制与真实已发布 CLI 复现:
精确的可用边界是 24.2.0 与 22.18.0 —— 不是笼统的「Node 24」;24.0.x / 24.1.0 同样受影响。 桥:
npx dsh-node-compat web
# 或:npm i -g dsh-node-compat && alias dsh=dsh-compat在守卫正常的运行时上它完全静默;在守卫失效的运行时上,它先打印诊断。它绝不会重复执行 —— 当启动器是主模块时, 永久修复是上游两行:把守卫换成在所有受支持运行时上都能用的判断,并声明 |
|
复核确认:这是 #6520 清单第 7 条的同族问题(Node 版本无运行时门槛),rc.2 不会修复它——rc.1/rc.2 的入口路径是同一条 master 线。
规避:升级 Node ≥ 24.2;或全局安装(npm i -g @deepseek-ai/dsh)后直接跑 |
Uh oh!
There was an error while loading. Please reload this page.
To: DeepSeek Harness Team
English Version
Hi DeepSeek Team,
I'm writing to report a compatibility bug in @deepseek-ai/dsh version 0.1.5-rc.1 that causes the CLI to silently exit without any output or error on Node.js v24.1.0.
Environment:
· OS: Windows 11 Pro for Workstations
· Node.js: v24.1.0 (installed via nvm-windows)
· npm: 11.3.0
· dsh: 0.1.5-rc.1 (installed globally via npm)
Symptom:
Running dsh web produces no output, writes nothing to log files, and never binds to port 3080. The process exits immediately with code 0. No error message is shown.
Root Cause:
In lib/bin.js, the entry point is guarded by:
import.meta.main was only introduced in Node.js v24.2.0 (and v22.18.0 on the 22.x line). On Node.js v24.1.0, this property is undefined, so runCli() is never called. The process loads the module, does nothing, and exits cleanly.
Why this is a problem:
The engines field in the published package.json (if present) specifies:
This range includes v24.0.0 and v24.1.0, which lack import.meta.main. Furthermore, the engines field appears to be absent from the published npm package, so npm does not warn or block installation on incompatible Node versions. Users on v24.1.0 get a silent failure with no clue about the version mismatch.
Suggested Fixes:
I spent considerable time debugging this, including checking WDAC policies, native module builds, and proxy settings, before discovering the Node minor version gap. A clear error message or a stricter engines field would save users a lot of trouble.
Thanks for your work on DeepSeek Harness.
尊敬的 DeepSeek 团队,
我写信是为了报告 @deepseek-ai/dsh 版本 0.1.5-rc.1 的一个兼容性缺陷:在 Node.js v24.1.0 环境下,CLI 会静默退出,没有任何输出或报错。
环境:
· 操作系统:Windows 11 Pro for Workstations
· Node.js:v24.1.0(通过 nvm-windows 安装)
· npm:11.3.0
· dsh:0.1.5-rc.1(通过 npm 全局安装)
症状:
运行 dsh web 后无任何输出,日志文件为空,也从未监听 3080 端口。进程立即以退出码 0 结束,没有任何错误提示。
根本原因:
在 lib/bin.js 中,入口逻辑由以下代码保护:
import.meta.main 这个 API 直到 Node.js v24.2.0(以及 22.x 系列的 v22.18.0)才被引入。在 Node.js v24.1.0 中,该属性为 undefined,因此 runCli() 永远不会被调用。进程加载完模块后什么都没做,就正常退出了。
为什么这是个问题:
发布包 package.json 中的 engines 字段(如果存在)声明为:
这个范围包含了 v24.0.0 和 v24.1.0,但它们缺少 import.meta.main。更严重的是,实际发布到 npm 的包中似乎根本没有携带 engines 字段,因此 npm 不会对不兼容的 Node 版本发出警告或阻止安装。使用 v24.1.0 的用户只会遇到静默失败,完全无法联想到是版本不匹配导致的。
建议的修复方式:
我花了大量时间排查这个问题,包括检查 WDAC 策略、原生模块构建、代理设置等,最后才发现是 Node 小版本号的差异。一个清晰的错误提示或更严格的 engines 字段,可以为用户省去很多麻烦。
感谢你们为 DeepSeek Harness 所做的工作。
All reactions