Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Open
Labels
Needs Triageneeds an initial review
@juliano-souza000

Description

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_logs2023円-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_logs2023円-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:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs Triageneeds an initial review

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /