Source checkout: every run fails with Cannot find module …/node-addon-system-<platform>/bin/system.node after pulling the fs-ext → node-addon-system migration(源码检出拉取 flock 迁移后运行即失败,缺 bin/system.node)
#6003
Unanswered
3rd-Musketeer
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Environment
deepseek-ai/deepseek-harness, HEAD5dda764ed3(dsh 0.1.5-alpha.1) — checked out before Sep 7, thengit pull+pnpm installSymptom
Every harness run fails at startup:
The checkout passed the documented First-time setup (
pnpm install+pnpm run typecheck), so nothing signaled that a build step was missing until the first run.Root cause
d927cbff99(Sep 7) replacedfs-extwith the in-repo@deepseek-ai/node-addon-systemfamily — motivated by the fs-ext NAN compile failures (Windows 更新后源码运行失败:fs-ext@2.1.1 在 node-gyp 阶段无法完成安装 (Windows source install fails at fs-ext@2.1.1 / node-gyp after recent update) #5784, 0.1.3.Alpha.2,引入了 fs-ext@2.1.1 无预编译二进制,强制本地 MSVC 编译 #5929, Windows install requires the full MSVC toolchain for fs-ext, which win32 never actually calls / Windows 安装被迫为从未调用的 fs-ext 拉起整套 MSVC 工具链 #5945). Reasonable move: npm consumers are unaffected, since the published platform tarballs shipbin/.optionalDependenciesareworkspace:*links tonative/system/packages/<platform>/, andpackages/*/bin/is gitignored by design — so on a source checkoutbin/stays empty until you build it.pnpm installsucceeds silently, and the setup-completion gate indocs/development.md(typecheck) never touches native artifacts. A machine set up before Sep 7 and pulled since therefore looks healthy until the first run.pnpm run build:native-system— is documented only innative/system/README.md(Development) and the Sep 7 agent note ("Source builds explicitly compile the host addon before repository tests and builds that need it"). It is absent from the root setup docs, and the runtimeMODULE_NOT_FOUNDcarries no pointer to it.Workaround (verified)
pnpm run build:native-system # from repo root; builds <platform>/bin/system.nodeAfter this,
native/system's flock suite passes 23/23 and runs start normally again. (Running that suite also needspnpm -C native/system run build:test-oraclefirst, or the 4 C-oracle tests fail.)Any pull that touches
native/requires re-running the build.Suggestions — any one of these closes this class of report:
docs/development.md, plus a "re-run after pulls touchingnative/" note.doctor-style check verifying that the host platform package'sprebuilds.json-declared files exist, failing with the exact fix command.pnpm run build:native-systemin the message.Happy to send a docs PR for (1) if that's useful.
环境:macOS arm64 源码检出(Sep 7 之前克隆,pull 至 0.1.5-alpha.1 /
5dda764ed3);Node 24.18.0 / pnpm 11.7.0。现象:每轮运行启动即失败,报
Cannot find module '…/native/system/packages/darwin-arm64/bin/system.node'(require 栈指向entry/src/flock.ts)。文档规定的初始化(pnpm install+pnpm run typecheck)全部通过,没有任何信号提示缺构建步骤。原因:
d927cbff99(9 月 7 日)用仓库内node-addon-system替换 fs-ext(动机即 #5784 / #5929 / #5945 的 fs-ext 编译问题;npm 用户不受影响,发布 tarball 自带bin/)。但 workspace 内平台包是workspace:*链接、packages/*/bin/按 design 不进 git,源码检出装完依赖后bin/为空;必需的pnpm run build:native-system只写在native/system子目录 README 和 agent note 里,根目录 setup 文档没有,运行时报错也不指路。解法(已验证):仓库根目录
pnpm run build:native-system;跑 flock 测试套件前先pnpm -C native/system run build:test-oracle。凡 pull 涉及native/都要重跑构建。建议(三选一即可):setup 文档补上该步骤;或 install / doctor 时校验宿主平台
prebuilds.json声明的文件并给出修复命令;或运行时报错直接带上pnpm run build:native-system。第 1 项我可以直接提 PR。All reactions