-
Notifications
You must be signed in to change notification settings - Fork 251
fix: 2026.3.13-zh.1 包构建产物缺失,导致 CLI 无法运行 #182
Copy link
Copy link
Open
Description
问题描述
npm 包 @qingchencloud/openclaw-zh@2026.3.13-zh.1 发布的构建产物不完整,导致安装后 CLI 无法正常运行或找不到入口文件。
复现步骤
- Windows 10/11,Node.js v24.14.1,npm 11.11.0
npm config set prefix D:\openclaw\node-globalnpm install -g @qingchencloud/openclaw-zh@2026.3.13-zh.1 --registry https://registry.npmmirror.com --force- 执行
where openclaw或openclaw --version,报找不到或运行报错
实际行为
1) 缺少 entry.mjs/entry.js 的依赖文件
dist/entry.js依赖subsystem-BDbeCphF.js、theme-H80Q3Qtv.js等,但这些文件不在 npm 包内npm pack --dry-run也未列出这些文件
2) 缺少 openclaw.mjs
- 首次安装时有,卸载后重装缺失(pnpm 全局安装/链接异常时尤为明显)
3) 全局可执行未正确链接
D:\openclaw\node-global\node_modules\.bin未创建 openclaw 链接,where openclaw找不到
期望行为
- 包内应包含完整的 dist 构建产物(entry.js 及其依赖的 subsystem-.js、theme-.js 等)
- 始终包含 openclaw.mjs 并正确设置 bin 字段或 postinstall 链接逻辑
- 确保使用 npm/pnpm 全局安装时 .bin 能正确生成可执行入口
环境信息
- OS: Windows_NT 10.0.26200
- Node.js: v24.14.1
- npm: 11.11.0
- 安装前缀: D:\openclaw\node-global
- Registry: https://registry.npmmirror.com
附加信息
npm pack --dry-run显示包内没有 dist/entry.js 和 dist/subsystem-*.js,但有 openclaw.mjs 和 dist/index.js- 通过 git insteadOf 修复后仍不可用,基本可排除网络/权限问题
建议修复
- 确保构建产物写入 dist 并在 package.json files 中包含相应通配
- 核对入口与 bin:将 CLI 入口明确到 bin 字段(如
"bin": { "openclaw": "dist/cli.js" }) - 补充 CI 发布前检查:
npm pack --dry-run校验关键文件是否在包内
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels