npm Community Forum (Archive)

The npm community forum has been discontinued.

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

Etarget Hangs and doesn't fail when npm package version does not exist

What I Wanted to Do

Whenever i use a package version from npm that does not exist yet i need to fail fast.

What Happened Instead

Currently the error gets thrown but the process hangs around for up what seems to be a random set of minutes

Reproduction Steps

npm install react@99.99.99

Details

Platform Info

$ npm --versions
{ npm: '6.4.1',
  ares: '1.10.1-DEV',
  cldr: '32.0',
  http_parser: '2.8.0',
  icu: '60.1',
  modules: '57',
  napi: '3',
  nghttp2: '1.32.0',
  node: '8.12.0',
  openssl: '1.0.2p',
  tz: '2017c',
  unicode: '10.0',
  uv: '1.19.2',
  v8: '6.2.414.66',
  zlib: '1.2.11' }
$ node -p process.platform
win32


This is probably some kind of hiccup with the shutdown process or some fd staying open.


I don’t mind giving this a go and do a pull request. Thank you for pointing me in a initial direction. Any help is much appreciated.