Skip to content

npm install occasionally times out #231

Description

@pillowfication

(Sorry if this is not the appropriate place to ask)

My package.json lists a private git repo as dependency as

"dependencies": {
  "@org/package": "github:org/package"
}

I'm using webfactory/ssh-agent@v0.9.0 so that it can install this package.

jobs:
  build:
    runs-on: windows-2022
    steps:
    - uses: actions/checkout@v4
    - uses: webfactory/ssh-agent@v0.9.0
      with:
        ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
    - name: Use Node.js 22.7
      uses: actions/setup-node@v4
      with:
        node-version: 22.7
    # This step may fail
    - name: Install
      run: npm clean-install
    - name: Build
      run: npm run build

The problem is that npm clean-install occasionally succeeds after ~5min and occasionally fails after ~15min.

npm error code 128
npm error A git connection error occurred
npm error command git --no-replace-objects clone --mirror -q ssh://git@github.com/org/package.git C:\npm\cache\_cacache\tmp\git-clonedca0sa/.git --config core.longpaths=true
npm error Read from remote host github.com: Connection reset by peer
npm error client_loop: send disconnect: Connection reset by peer
npm error fetch-pack: unexpected disconnect while reading sideband packet
npm error fatal: early EOF
npm error fatal: fetch-pack: invalid index-pack output
npm error A complete log of this run can be found in: C:\npm\cache\_logs\xxxx-xx-xxxxx_xx_xx_xxxx-debug-0.log
Error: Process completed with exit code 1.

Is there anything that can be done about this?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions