Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Cannot install git package without HEAD ref #116

Open
1 task done
juliano-souza000 opened this issue Jan 26, 2023 · 0 comments
Open
1 task done

[BUG] Cannot install git package without HEAD ref #116

juliano-souza000 opened this issue Jan 26, 2023 · 0 comments
Labels
Needs Triage needs an initial review

Comments

@juliano-souza000
Copy link

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

  1. Run npm install ssh+git://git@private/private_repo#reference
  2. 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:
@juliano-souza000 juliano-souza000 added the Needs Triage needs an initial review label Jan 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Triage needs an initial review
Projects
None yet
Development

No branches or pull requests

1 participant