本轮运行失败Cannot read properties of undefined (reading 'prepare') #7035
Replies: 34 comments 36 replies
回退可用: git reset --hard c6c3ad9不会退的方案: diff --git a/apps/cli/src/profile-boot.ts b/apps/cli/src/profile-boot.ts
index ededd48a87..fd7bb8efc4 100644
--- a/apps/cli/src/profile-boot.ts
+++ b/apps/cli/src/profile-boot.ts
@@ -238,7 +238,7 @@ export interface RunProfileOptions {
args: readonly string[]
/** Application-owned package runtime, scoped to plugin package operations. */
packageManager?: ProfileContext['packageManager']
- /** Module fallback backend; defaults to runtime. Plain Node callers may override it; pkg executables always use runtime. */
+ /** Module fallback backend; defaults to link. Plain Node callers may override it; pkg executables always use runtime. */
resolutionMode?: ProfileResolutionMode
}
@@ -260,7 +260,7 @@ export async function runProfile(options: RunProfileOptions): Promise<{ ctx: Con
)
const packaged = (process as NodeJS.Process & { pkg?: unknown }).pkg !== undefined
- const resolutionMode = packaged ? 'runtime' : options.resolutionMode ?? 'runtime'
+ const resolutionMode = packaged ? 'runtime' : options.resolutionMode ?? 'link'
const app: { current?: Context } = {}
let disposal: Promise<void> | undefined
const dispose = (): Promise<void> => disposal ??= (async () => {
diff --git a/apps/cli/tests/built-bin.e2e.ts b/apps/cli/tests/built-bin.e2e.ts
index dbaf904569..781396262a 100644
--- a/apps/cli/tests/built-bin.e2e.ts
+++ b/apps/cli/tests/built-bin.e2e.ts
@@ -984,7 +984,7 @@ describe.skipIf(!existsSync(dshBin))('dsh BUILT bin (node lib/bin.js, no tsx)',
try {
await waitForFile(fixture.ready)
expect(readFileSync(fixture.echo, 'utf8')).toBe('bundle-default')
- expect(existsSync(join(fixture.home, 'profiles', 'node_modules'))).toBe(false)
+ expect(existsSync(join(fixture.home, 'profiles', 'node_modules'))).toBe(true)
requestProfileShutdown(child, fixture)
expect((await child).exitCode).toBe(0)
} finally {
diff --git a/apps/cli/tests/resolved-profile-boot.spec.ts b/apps/cli/tests/resolved-profile-boot.spec.ts
index e968f91504..22a5decb84 100644
--- a/apps/cli/tests/resolved-profile-boot.spec.ts
+++ b/apps/cli/tests/resolved-profile-boot.spec.ts
@@ -91,7 +91,7 @@ describe('runProfile with an application-owned profile', () => {
})
it.each([
- { selection: 'default', options: {}, mode: 'runtime' },
+ { selection: 'default', options: {}, mode: 'link' }, |
|
我chovy, 你们给我测好了再发呀 |
|
今天更新完就不行了 |
|
node apps\cli\lib\bin.js web 目前只能先这样启动了 |
|
apps/cli/src/profile-boot.ts:262
|
|
已收到。@vancur2021 @zhuminghuid 方便补充出错时的 DSH 版本号和启动命令吗?需要据此区分源码启动与其他安装方式下的同名报错。 |
|
输出了一篇今天的排查过程,而且衍生出另一个问题,触发这种报错后,这个会话就废了 |
|
环境:Windows 11 / Node v20 / 全局安装 npm |
|
功力尽失了 |
|
解决方案(大概): -export const TOOL_RUNTIME_SCHEDULER: unique symbol = Symbol('@deepseek-ai/dsh-tools.scheduler')
+export const TOOL_RUNTIME_SCHEDULER: unique symbol = Symbol.for('@deepseek-ai/dsh-tools.scheduler')
已在同一份检出上本地验证:仅改这一行并重新 |
|
我chovy!我以为又炸插件了,紧急disable了由remove了一波,版本给我拿测好的啊 |
|
我还以为自己插件问题,原来是有bug |
|
中午更新完测了一下,发现咋测就报错就来看社区了,果然是测试问题,人麻了 |
|
为什么切换回dsh-v0.1.6-alpha.2还是报错 |
|
补一个可能与上面源码启动路径不同的触发变体,供官方区分同名报错(本机探针结论,欢迎用 module 探针复核): 环境:DSH 本机核对:
本地验证:把 区分意义:如果只修 tsx/src-lib,或只做 profile 去重,这条"官方包自身 exports 双构建"路径可能仍会触发。相关:#7011、#6529、#7048、#7062。 English TL;DR: On my machine the two |
|
我问deepseek,它给出的解决方案是 一个命令 ‘New-Item -ItemType Junction -Path "C:\Users\Administrator.dsh\profiles\web\node_modules@deepseek-ai\dsh-tools" -Target "E:\workspace\deepseek-harness\packages\core\tools" ‘,我运行后重新编译,就好了 |
|
我chovy,你们测产品给我测好了再拿给我啊 |
|
补充一份实测结果:Windows 11、Node 24.16.0、pnpm 11.7.0,使用 将 这进一步确认是同一进程加载了不同模块实例导致 symbol 不一致。原失败会话因已写入 |
|
四天了 还没修复 干什么吃的 |
|
你们的回归测试呢,吃白饭的大肥鱼?气死我了 |
|
赶紧修复吧,已经三四天没用dsh干活了,问啥都挂 |
|
果然如果遇到了过于奇怪的情况就需要到社区看看 |
|
HANDOVER-to-3080.md |
|
感谢汇报bug,会在即将发布的下一个版本修复。 |
|
补充一份可无密钥复现、带模块解析探针的证据链(Windows 11 / Node v24.18.0 / pnpm 11.7.0 / tsx 4.22.4 / 快照 2026-09-17 / 0.1.6-alpha.2): 现象: 机制(同一进程出现两份 @deepseek-ai/dsh-tools):用 即:插件入口经安装/bundle manifest 锚点由 Node 内部解析落到 无密钥复现(不需要 DEEPSEEK_API_KEY):
结论:README 的源码启动( |







Uh oh!
There was an error while loading. Please reload this page.
本轮运行失败Cannot read properties of undefined (reading 'prepare')
All reactions