npm Community Forum (Archive)

The npm community forum has been discontinued.

To discuss usage of npm, visit the GitHub Support Community.

Npm install with alot of private repositories - connection_closed, cb never called()

Hi

What I Wanted to Do

I am using a package.json with 18 private packages (all pointing to my gitlab, “git+ssh” …). I Want to run npm install to download my packages.

What Happened Instead

When I try to run npm install, depending on npm version, I get different errors like ’ remote host connection_closed’, cb never called() etc…

Reproduction Steps

It seems it happens when you are requesting a server with sshd allowing less connections than npm install does when using mode silly to get metadata about the repositories.

My server had 10 connections max ( http://www.hypertable.com/documentation/misc/ssh_maxstartups/ ).

So to reproduce it should be easy, but requires to setup an environmnent:

Details

By increasing sshd_config MaxStartups to 30 on my server hosting Gitlab, I don’t have the error anymore.

I think that in silly mode, npm doesn’t close ssh connections, and is stacking them until it has all the repositories information.

Platform Info

$ npm --versions
{ npm: '6.9.0',
  ares: '1.10.1-DEV',
  cldr: '32.0',
  http_parser: '2.8.0',
  icu: '60.1',
  modules: '57',
  napi: '3',
  nghttp2: '1.33.0',
  node: '8.15.1',
  openssl: '1.0.2r',
  tz: '2017c',
  unicode: '10.0',
  uv: '1.23.2',
  v8: '6.2.414.75',
  zlib: '1.2.11' }
$ node -p process.platform
linux

I hope this could help you.

Best regards


(post withdrawn by author, will be automatically deleted in 24 hours unless flagged)