`Cannot find module .../bin/pnpm.cjs` after upgrading from Corepack <=0.34.4 with pnpm 12 cached
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 75/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- node.js, typescript
调研方向
Start with sources/corepackUtils.ts at the linked lines and inspect how cached package-manager records and their bins are checked. Run the linked reproduction: install pnpm 12.2.1 with Corepack 0.34.0, then invoke it with 0.36.0. Done means Corepack detects the missing recorded bin and reinstalls pnpm instead of failing with Cannot find module.
由索引模型根据 Issue 内容生成。
描述
Repro: https://github.com/abappi19/corepack-stale-cache-repro
$ npx [email protected] install # package.json pins [email protected]
$ npx [email protected] pnpm --version
Error: Cannot find module '<COREPACK_HOME>/v1/pnpm/12.2.1/bin/pnpm.cjs'
- Corepack <=0.34.4 caches pnpm 12 with
bin: ./bin/pnpm.cjs, a file pnpm 12 doesn't ship, and later releases reuse that record as is (corepackUtils.ts). - Temporary workaround:
corepack cache clean.
Expected: Corepack reinstalls the version when its recorded bins are missing.
AI disclosure: I used a coding agent to help investigate and build the repro, and verified the cause against the source myself.
- 主要语言
- TypeScript
- 星标
- 3.8k
- 派生
- 282
- 平均合并
- 3 小时 21 分钟
- 30 天内合并 PR
- 1
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
nodejs/corepack 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 64/100
-
[BUG] corepack not use COREPACK_NPM_REGISTRY install of tarball可能已有人在做 @Yash121l 于 27 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
-
Support signature verification against a custom COREPACK_NPM_REGISTRY可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 4/5 3-5 天 新手友好度 68/100
-
Error when upgrading pnpm to latest in `devEngines.packageManager`可能已有人在做 @thiagobarbosa 于 77 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 52/100
-
难度 4/5 3-5 天 新手友好度 45/100
相似的 Issue
-
enhancement
难度 1/5 1 小时以内 新手友好度 80/100
alunduil/projects-v2-sync#21 ·
-
难度 2/5 1-3 小时 新手友好度 85/100
-
enhancement minor
难度 2/5 1-3 小时 新手友好度 74/100
testcontainers/testcontainers-node#1539 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 70/100
christopher-buss/eslint-plugin-flawless#72 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
openwatersio/slackwater-database#281 ·
维护者通常 1 天内回复