You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
摘要
npx @deepseek-ai/dsh web在干净环境下启动即崩:ERR_MODULE_NOT_FOUND: Cannot find package '@deepseek-ai/cordis-plugin-group' imported from .../dsh-app-boot/lib/index.js(#982 macOS、#1030 Windows 两位用户独立复现)。根因是发布配置缺陷:dsh-app-boot在 lib/index.js L11 顶层静态 import@deepseek-ai/cordis-plugin-group(运行时必需),但该包在 package.json 中只被声明在 peerDependencies(dependencies 仅有js-yaml),而@deepseek-ai/dsh主包 dependencies 里也唯独漏掉这个包(同族的 cordis-plugin-hmr/loader/include 都列了)——npm/pnpm 对 peer 依赖的自动安装不保证,干净环境安装后必然缺包。复现步骤
npx @deepseek-ai/dsh web。node_modules/@deepseek-ai/下存在 cordis-plugin-hmr/loader/include,唯独没有 cordis-plugin-group。根因(源码定位,rc.6 + registry 元数据)
@deepseek-ai/dsh-app-boot:lib/index.jsL11:import Group from "@deepseek-ai/cordis-plugin-group";—— 顶层静态 import,模块加载即需要该包存在;package.json(registry0.1.0-rc.6与本机 npx 缓存包一致):dependencies只有js-yaml;@deepseek-ai/cordis-plugin-group(^1.0.1)在 peerDependencies —— 静态 import 的运行时依赖放在了 peer 区,独立安装场景不会保证装。@deepseek-ai/dsh@0.1.0-rc.6dependencies 含 47 个@deepseek-ai包(含cordis-plugin-hmr/cordis-plugin-loader/cordis-plugin-include),唯独没有cordis-plugin-group——恰好漏掉崩溃点对应的包。建议修复
方案 A(推荐)· 发布配置补全依赖:把
@deepseek-ai/cordis-plugin-group加入@deepseek-ai/dsh主包的dependencies(与 cordis-plugin-hmr/loader/include 并列);或把dsh-app-boot的该包从 peerDependencies 移入 dependencies(静态 import 的运行时依赖本就该在 dependencies)——发布配置一行修复,重新发布 rc.6 修补版即可。方案 B · 动态 import + 容错:dsh-app-boot 改为运行时动态 import 并给出可读错误——不推荐:该包是引导链必需件,缺了本来就该失败,问题是"安装时就没装上",动态 import 不解决安装问题。
影响
npx @deepseek-ai/dsh web必然崩溃,无法启动——install failed #982/大佬求教,安装不上了 #1030 双平台独立复现;dsh-type-meta缺失导致 pnpm 安装 404)同类:rc.6 系列的包发布不完整问题已至少两例,建议对 rc.6 全家桶做一次依赖完整性校验(发布流水线加"全量包可解析 + 静态 import 全部在 dependencies"检查);环境
验证材料
@deepseek-ai/dsh-app-boot@0.1.0-rc.6dependencies={js-yaml}、peerDependencies 含@deepseek-ai/cordis-plugin-group ^1.0.1;@deepseek-ai/dsh@0.1.0-rc.6dependencies 47 个包中无 cordis-plugin-group;dsh-app-boot/lib/index.jsL11 静态 import + 同款依赖声明;First analysis of discussion #1030. Happy to open a PR with fix option A.
All reactions