Not working with pnpm
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- typescript, webpack
调研方向
先从链接的复现步骤和 src/lib/actions/versions.ts 第 362-368 行附近的代码开始,然后跟踪 src/lib/util/dependencies.ts 第 145-209 行中的路径处理。将逻辑上的 filePath 与 modsToFilePath 中的 realpath 键进行比较,并使用 pnpm 复现空 map。当复现不再报告空的 Found map 或缺失的 sources 时,即视为完成。
由索引模型根据 Issue 内容生成。
描述
Reproduction: https://github.com/vjpr/repro-inspectpack-pnpm-test
Possibly related: https://github.com/FormidableLabs/inspectpack/issues/131
Upon compiling I get the following error.
Compiled with warnings.
Missing sources: Expected 4, found 0.
Found map: {}
Notice how Found map: {}.
I've tracked down what is causing the map to be empty to here:
filePath = /Users/Vaughan/dev/inspectpack-pnpm-test/packages/cra/node_modules/react-refresh
modsToFilePath = {
"/Users/Vaughan/dev/inspectpack-pnpm-test/node_modules/.pnpm/[email protected]/node_modules/react-refresh": [
{
"baseName": "react-refresh/cjs/react-refresh-runtime.development.js",
"chunks": [
0
],
"identifier": "/Users/Vaughan/dev/inspectpack-pnpm-test/node_modules/.pnpm/[email protected]_427212bc1158d185e577033f19ca0757/node_modules/babel-loader/lib/index.js??ref--5-oneOf-3!/Users/Vaughan/dev/inspectpack-pnpm-test/node_modules/.pnpm/[email protected]/node_modules/react-refresh/cjs/react-refresh-runtime.development.js",
"isNodeModules": true,
"isSynthetic": false,
"size": 23198,
},
{
"baseName": "react-refresh/runtime.js",
"chunks": [
0
],
"identifier": "/Users/Vaughan/dev/inspectpack-pnpm-test/node_modules/.pnpm/[email protected]_427212bc1158d185e577033f19ca0757/node_modules/babel-loader/lib/index.js??ref--5-oneOf-3!/Users/Vaughan/dev/inspectpack-pnpm-test/node_modules/.pnpm/[email protected]/node_modules/react-refresh/runtime.js",
"isNodeModules": true,
"isSynthetic": false,
"size": 221,
"source": "'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-refresh-runtime.production.min.js');\n} else {\n module.exports = require('./cjs/react-refresh-runtime.development.js');\n}"
}
],
"/Users/Vaughan/dev/inspectpack-pnpm-test/node_modules/.pnpm/[email protected]/node_modules/react-refresh": [
{
"baseName": "react-refresh/cjs/react-refresh-runtime.development.js",
"chunks": [
0
],
"identifier": "/Users/Vaughan/dev/inspectpack-pnpm-test/node_modules/.pnpm/[email protected]_427212bc1158d185e577033f19ca0757/node_modules/babel-loader/lib/index.js??ref--5-oneOf-3!/Users/Vaughan/dev/inspectpack-pnpm-test/node_modules/.pnpm/[email protected]/node_modules/react-refresh/cjs/react-refresh-runtime.development.js",
"isNodeModules": true,
"isSynthetic": false,
"size": 23096,
},
{
"baseName": "react-refresh/runtime.js",
"chunks": [
0
],
"identifier": "/Users/Vaughan/dev/inspectpack-pnpm-test/node_modules/.pnpm/[email protected]_427212bc1158d185e577033f19ca0757/node_modules/babel-loader/lib/index.js??ref--5-oneOf-3!/Users/Vaughan/dev/inspectpack-pnpm-test/node_modules/.pnpm/[email protected]/node_modules/react-refresh/runtime.js",
"isNodeModules": true,
"isSynthetic": false,
"size": 221,
}
]
}
Notice how modsToFilePath's keys are the "realpath" of the package, whereas filePath is the "logical path".
filePath seems to comes from here:
However I have reached the point where I don't understand what is going on and maybe a maintainer could quickly point to the right fix?
- 主要语言
- TypeScript
- 星标
- 590
- 派生
- 20
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
FormidableLabs/inspectpack 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 25/100
FormidableLabs/inspectpack#181 · 1 条评论 · 2 个 reaction ·
-
难度 3/5 1-2 天 新手友好度 35/100
FormidableLabs/inspectpack#180 · 1 条评论 ·
-
Allow CI to pass未关闭unverified
难度 3/5 1-2 天 新手友好度 35/100
FormidableLabs/inspectpack#179 · 1 条评论 ·
-
难度 4/5 3-5 天 新手友好度 35/100
FormidableLabs/inspectpack#168 · 1 条评论 ·
-
难度 4/5 3-5 天 新手友好度 42/100
FormidableLabs/inspectpack#150 · 2 条评论 ·
查看 FormidableLabs/inspectpack 的全部 Issue
相似的 Issue
-
check:passed streams:edit
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
area:mcp bug has repro platform:vscode regression
难度 2/5 1-3 小时 新手友好度 68/100
anthropics/claude-code#103970 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
sdk-typescript: unquoted COPY globs in shell form are silently dropped from the image build context未关闭bug javascript
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复