Error: Cannot find module 'C:\Program Files\nodejs\node_modules\corepack\dist\yarn.js'
还没有人认领这个 Issue。
评估
调研方向
在 Windows 上使用 Node.js 25 重现报告的流程:全局安装 Corepack,运行 corepack enable 和 corepack use yarn@stable,然后运行 yarn install。跟踪已启用的 Yarn launcher 如何解析 Corepack 的安装路径,并在 yarn install 不再请求缺失的 dist/yarn.js 模块时,认为 issue 已完成。
由索引模型根据 Issue 内容生成。
描述
I just upgraded to node 25 and the good news comes to me.
Corepack is no more bundled inside nodejs.
After some research I found that I have to do:
npm install -g corepack // extra
corepack enable // as usual
corepack use yarn@stable // as usual
the corepack use yarn@stable will work but then if I do:
yarn install
I get:
node:internal/modules/cjs/loader:1422
throw err;
^
Error: Cannot find module 'C:\Program Files\nodejs\node_modules\corepack\dist\yarn.js'
at Module._resolveFilename (node:internal/modules/cjs/loader:1419:15)
at defaultResolveImpl (node:internal/modules/cjs/loader:1057:19)
at resolveForCJSWithHooks (node:internal/modules/cjs/loader:1062:22)
at Module._load (node:internal/modules/cjs/loader:1225:37)
at TracingChannel.traceSync (node:diagnostics_channel:328:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:244:24)
at Module.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:154:5)
at node:internal/main/run_main_module:33:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
Node.js v25.0.0
- 主要语言
- TypeScript
- 星标
- 3.8k
- 派生
- 279
- 平均合并
- 1 小时 47 分钟
- 30 天内合并 PR
- 2
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
nodejs/corepack 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 64/100
-
难度 2/5 1-3 小时 新手友好度 72/100
-
难度 4/5 3-5 天 新手友好度 68/100
-
难度 3/5 1-2 天 新手友好度 52/100
-
难度 3/5 1-2 天 新手友好度 68/100
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 75/100
safetrustcr/dApp-SafeTrust#426 ·
-
area:workflow bug ready-for-agent
难度 2/5 1-3 小时 新手友好度 75/100
fil-donadoni/tolaria#4409 ·
-
难度 2/5 1-3 小时 新手友好度 70/100
Fission-AI/OpenSpec#1960 ·
-
Add dependabot 未关闭
难度 2/5 1-3 小时 新手友好度 70/100
-
难度 2/5 1-3 小时 新手友好度 75/100
corsairdev/corsair#1764 ·