[BUG] Cannot install git package without HEAD ref
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- git, javascript
- 领域
- cli
调研方向
Start by reproducing the npm install command from the issue against a repository whose HEAD reference is unavailable, then trace the git reference resolution path that produces the undefined sha error. Done means the specified branch, commit hash, or tag can be installed without requiring a HEAD reference.
由索引模型根据 Issue 内容生成。
描述
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
npm install fails to clone branch, commit hash or tag when the repo does not have a HEAD reference.
Error Message:
`npm ERR! Cannot read properties of undefined (reading 'sha')
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\user\AppData\Local\npm-cache_logs\2023-01-26T12_33_01_788Z-debug-0.log`
Expected Behavior
It should still be able to clone the specified reference.
Steps To Reproduce
- Run
npm install ssh+git://git@private/private_repo#reference - Wait for the error to show up.
`npm ERR! Cannot read properties of undefined (reading 'sha')
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\user\AppData\Local\npm-cache_logs\2023-01-26T12_33_01_788Z-debug-0.log`
Environment
- npm: 9.3.1
- Node: v16.14.2
- OS: Windows 11 Pro 21H2 22000.1455 Windows Feature Experience Pack 1000.22000.1455.0
- platform:
- 主要语言
- JavaScript
- 星标
- 75
- 派生
- 31
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
npm/git 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 48/100
-
Needs Triage
难度 3/5 1-2 天 新手友好度 64/100
-
难度 5/5 一周以上 新手友好度 25/100
-
[BUG] StrictHostKeyChecking=accept-new causes install failure on OpenSSH <7.6可能已有人在做 @nlf 于 1948 天前认领。 未关闭
相似的 Issue
-
[BUG]: Prompt compressor crashes with TypeError when a past chat has a non-string response.text可能已有人在做 @ManojDevarajulu 今天认领。 未关闭possible bug
难度 2/5 1-3 小时 新手友好度 82/100
Mintplex-Labs/anything-llm#6737 ·
维护者通常 1 天内回复
-
check:passed feeds:add
难度 2/5 1 小时以内 新手友好度 62/100
-
难度 2/5 1-3 小时 新手友好度 74/100
motiondivision/motion#3935 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 70/100
codex-team/editor.js#3037 ·
-
No Code Attached Yet
难度 2/5 1-3 小时 新手友好度 72/100
joomla/joomla-cms#48626 ·
维护者通常 1 天内回复