[BUG] Cannot install git package without HEAD ref
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 35/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- git, javascript
- Bereich
- cli
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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:
- Vorherrschende Sprache
- JavaScript
- Sterne
- 75
- Forks
- 31
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus npm/git
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
-
Needs Triage
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 64/100
-
feat: implement cachingOffen
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 25/100
-
[BUG] StrictHostKeyChecking=accept-new causes install failure on OpenSSH <7.6Evtl. vergeben @nlf hat das vor 1972 Tagen übernommen. Offen
npm/git#31 · 14 Kommentare · 15 Reaktionen · 1 zugewiesene Person ·
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
Maintainer antworten meist innerhalb von 2 Tagen
-
desktop v3 windows
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
esengine/DeepSeek-Reasonix#15016 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Fei2411/DeepSeek-Bot#1113 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
arfct/timezone.fyi#19 ·