MaxListenerExceededWarning during globally installing packages

What I Wanted to Do

Just install poi and sao globally.

What Happened Instead

npm installs my packages properly but there is some unexpected output during the installation process.

Reproduction Steps

Just globally install any packages, like what Iā€™m doing ā€“ npm install -g poi sao

Details

The output during the install:

(node:23470) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 drain listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit

Platform Info

$ npm --versions
{
  npm: '6.10.2',
  ares: '1.15.0',
  brotli: '1.0.7',
  cldr: '35.1',
  http_parser: '2.8.0',    
  icu: '64.2',
  llhttp: '1.1.4',
  modules: '72',
  napi: '4',
  nghttp2: '1.39.2',       
  node: '12.9.0',
  openssl: '1.1.1c',       
  tz: '2019a',
  unicode: '12.1',
  uv: '1.31.0',
  v8: '7.6.303.29-node.15',
  zlib: '1.2.11'
}
$ node -p process.platform
linux
# This is on WSL Ubuntu 18.04

I was not able to reproduce this with npm 6.11.2 and node v10.16.3 on Darwin.

$ npm install -g poi sao
/usr/local/bin/poi -> /usr/local/lib/node_modules/poi/bin/cli.js
/usr/local/bin/sao -> /usr/local/lib/node_modules/sao/bin/cli.js

> fsevents@1.2.9 install /usr/local/lib/node_modules/poi/node_modules/fsevents
> node install

node-pre-gyp WARN Using needle for node-pre-gyp https download 
[fsevents] Success: "/usr/local/lib/node_modules/poi/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node" is installed via remote
+ sao@1.6.1
+ poi@12.7.2
added 1349 packages from 533 contributors in 53.595s

I was able to reproduce with npm 6.10.2 and node v12.9.0 (on darwin).

Yes exactly. This looks only appears with npm 6.10.2 and node v12.9.0, and the strange thing is Yarn has the same problem on node v12.9.0.
This seems to be a problem with node.

Already identified, and will be fixed on the next node release.

1 Like