sindresorhus / atom-linter-xo

Linter for XO
https://github.com/xojs/xo
MIT License
88 stars 10 forks source link

Error during installation: 'warning: possible EventEmitter memory leak detected. 11 error listeners ...' #58

Closed giacomocerquone closed 7 years ago

giacomocerquone commented 7 years ago

Environment

OS: Windows 10 Atom -v:

Atom    : 1.12.6
Electron: 1.3.9
Chrome  : 52.0.2743.82
Node    : 6.5.0

Problem

Trying to install this linter through: apm install linter-xo This is what I get:

> buffer-offset-index@0.0.1 install C:\Users\Giacomo\AppData\Local\Temp\apm-install-dir-116114-5988-eh894t\node_modules\
linter-xo\node_modules\buffer-offset-index
> node-gyp rebuild

C:\Users\Giacomo\AppData\Local\Temp\apm-install-dir-116114-5988-eh894t\node_modules\linter-xo\node_modules\buffer-offset
-index>if not defined npm_config_node_gyp (node "C:\Users\Giacomo\AppData\Local\atom\app-1.12.6\resources\app\apm\node_m
odules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Users\Giacomo\AppDat
a\Local\atom\app-1.12.6\resources\app\apm\bin\\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )
C:\Users\Giacomo\AppData\Local\Temp\apm-install-dir-116114-5988-eh894t
`-- (empty)

(node) warning: possible EventEmitter memory leak detected. 11 error listeners added. Use emitter.setMaxListeners() to i
ncrease limit.
Trace
    at TLSSocket.addListener (events.js:239:17)
    at TLSSocket.Readable.on (_stream_readable.js:673:33)
    at Request.<anonymous> (C:\Users\Giacomo\AppData\Local\atom\app-1.12.6\resources\app\apm\node_modules\npm-registry-c
lient\lib\request.js:153:7)
    at emitOne (events.js:77:13)
    at Request.emit (events.js:169:7)
    at ClientRequest.<anonymous> (C:\Users\Giacomo\AppData\Local\atom\app-1.12.6\resources\app\apm\node_modules\request\
request.js:823:10)
    at emitOne (events.js:82:20)
    at ClientRequest.emit (events.js:169:7)
    at tickOnSocket (_http_client.js:502:7)
    at onSocketNT (_http_client.js:514:5)
(node) warning: possible EventEmitter memory leak detected. 11 error listeners added. Use emitter.setMaxListeners() to i
ncrease limit.
Trace
    at TLSSocket.addListener (events.js:239:17)
    at TLSSocket.Readable.on (_stream_readable.js:673:33)
    at Request.<anonymous> (C:\Users\Giacomo\AppData\Local\atom\app-1.12.6\resources\app\apm\node_modules\npm-registry-c
lient\lib\request.js:153:7)
    at emitOne (events.js:77:13)
    at Request.emit (events.js:169:7)
    at ClientRequest.<anonymous> (C:\Users\Giacomo\AppData\Local\atom\app-1.12.6\resources\app\apm\node_modules\request\
request.js:823:10)
    at emitOne (events.js:82:20)
    at ClientRequest.emit (events.js:169:7)
    at tickOnSocket (_http_client.js:502:7)
    at onSocketNT (_http_client.js:514:5)
(node) warning: possible EventEmitter memory leak detected. 11 error listeners added. Use emitter.setMaxListeners() to i
ncrease limit.
Trace
    at TLSSocket.addListener (events.js:239:17)
    at TLSSocket.Readable.on (_stream_readable.js:673:33)
    at Request.<anonymous> (C:\Users\Giacomo\AppData\Local\atom\app-1.12.6\resources\app\apm\node_modules\npm-registry-c
lient\lib\request.js:153:7)
    at emitOne (events.js:77:13)
    at Request.emit (events.js:169:7)
    at ClientRequest.<anonymous> (C:\Users\Giacomo\AppData\Local\atom\app-1.12.6\resources\app\apm\node_modules\request\
request.js:823:10)
    at emitOne (events.js:82:20)
    at ClientRequest.emit (events.js:169:7)
    at tickOnSocket (_http_client.js:502:7)
    at onSocketNT (_http_client.js:514:5)
(node) warning: possible EventEmitter memory leak detected. 11 error listeners added. Use emitter.setMaxListeners() to i
ncrease limit.
Trace
    at TLSSocket.addListener (events.js:239:17)
    at TLSSocket.Readable.on (_stream_readable.js:673:33)
    at Request.<anonymous> (C:\Users\Giacomo\AppData\Local\atom\app-1.12.6\resources\app\apm\node_modules\npm-registry-c
lient\lib\request.js:153:7)
    at emitOne (events.js:77:13)
    at Request.emit (events.js:169:7)
    at ClientRequest.<anonymous> (C:\Users\Giacomo\AppData\Local\atom\app-1.12.6\resources\app\apm\node_modules\request\
request.js:823:10)
    at emitOne (events.js:82:20)
    at ClientRequest.emit (events.js:169:7)
    at tickOnSocket (_http_client.js:502:7)
    at onSocketNT (_http_client.js:514:5)
(node) warning: possible EventEmitter memory leak detected. 11 error listeners added. Use emitter.setMaxListeners() to i
ncrease limit.
Trace
    at TLSSocket.addListener (events.js:239:17)
    at TLSSocket.Readable.on (_stream_readable.js:673:33)
    at Request.<anonymous> (C:\Users\Giacomo\AppData\Local\atom\app-1.12.6\resources\app\apm\node_modules\npm-registry-c
lient\lib\request.js:153:7)
    at emitOne (events.js:77:13)
    at Request.emit (events.js:169:7)
    at ClientRequest.<anonymous> (C:\Users\Giacomo\AppData\Local\atom\app-1.12.6\resources\app\apm\node_modules\request\
request.js:823:10)
    at emitOne (events.js:82:20)
    at ClientRequest.emit (events.js:169:7)
    at tickOnSocket (_http_client.js:502:7)
    at onSocketNT (_http_client.js:514:5)
(node) warning: possible EventEmitter memory leak detected. 11 error listeners added. Use emitter.setMaxListeners() to i
ncrease limit.
Trace
    at TLSSocket.addListener (events.js:239:17)
    at TLSSocket.Readable.on (_stream_readable.js:673:33)
    at Request.<anonymous> (C:\Users\Giacomo\AppData\Local\atom\app-1.12.6\resources\app\apm\node_modules\npm-registry-c
lient\lib\request.js:153:7)
    at emitOne (events.js:77:13)
    at Request.emit (events.js:169:7)
    at ClientRequest.<anonymous> (C:\Users\Giacomo\AppData\Local\atom\app-1.12.6\resources\app\apm\node_modules\request\
request.js:823:10)
    at emitOne (events.js:82:20)
    at ClientRequest.emit (events.js:169:7)
    at tickOnSocket (_http_client.js:502:7)
    at onSocketNT (_http_client.js:514:5)
(node) warning: possible EventEmitter memory leak detected. 11 error listeners added. Use emitter.setMaxListeners() to i
ncrease limit.
Trace
    at TLSSocket.addListener (events.js:239:17)
    at TLSSocket.Readable.on (_stream_readable.js:673:33)
    at Request.<anonymous> (C:\Users\Giacomo\AppData\Local\atom\app-1.12.6\resources\app\apm\node_modules\npm-registry-c
lient\lib\request.js:153:7)
    at emitOne (events.js:77:13)
    at Request.emit (events.js:169:7)
    at ClientRequest.<anonymous> (C:\Users\Giacomo\AppData\Local\atom\app-1.12.6\resources\app\apm\node_modules\request\
request.js:823:10)
    at emitOne (events.js:82:20)
    at ClientRequest.emit (events.js:169:7)
    at tickOnSocket (_http_client.js:502:7)
    at onSocketNT (_http_client.js:514:5)
(node) warning: possible EventEmitter memory leak detected. 11 error listeners added. Use emitter.setMaxListeners() to i
ncrease limit.
Trace
    at TLSSocket.addListener (events.js:239:17)
    at TLSSocket.Readable.on (_stream_readable.js:673:33)
    at Request.<anonymous> (C:\Users\Giacomo\AppData\Local\atom\app-1.12.6\resources\app\apm\node_modules\npm-registry-c
lient\lib\request.js:153:7)
    at emitOne (events.js:77:13)
    at Request.emit (events.js:169:7)
    at ClientRequest.<anonymous> (C:\Users\Giacomo\AppData\Local\atom\app-1.12.6\resources\app\apm\node_modules\request\
request.js:823:10)
    at emitOne (events.js:82:20)
    at ClientRequest.emit (events.js:169:7)
    at tickOnSocket (_http_client.js:502:7)
    at onSocketNT (_http_client.js:514:5)
(node) warning: possible EventEmitter memory leak detected. 11 error listeners added. Use emitter.setMaxListeners() to i
ncrease limit.
Trace
    at TLSSocket.addListener (events.js:239:17)
    at TLSSocket.Readable.on (_stream_readable.js:673:33)
    at Request.<anonymous> (C:\Users\Giacomo\AppData\Local\atom\app-1.12.6\resources\app\apm\node_modules\npm-registry-c
lient\lib\request.js:153:7)
    at emitOne (events.js:77:13)
    at Request.emit (events.js:169:7)
    at ClientRequest.<anonymous> (C:\Users\Giacomo\AppData\Local\atom\app-1.12.6\resources\app\apm\node_modules\request\
request.js:823:10)
    at emitOne (events.js:82:20)
    at ClientRequest.emit (events.js:169:7)
    at tickOnSocket (_http_client.js:502:7)
    at onSocketNT (_http_client.js:514:5)
(node) warning: possible EventEmitter memory leak detected. 11 error listeners added. Use emitter.setMaxListeners() to i
ncrease limit.
Trace
    at TLSSocket.addListener (events.js:239:17)
    at TLSSocket.Readable.on (_stream_readable.js:673:33)
    at Request.<anonymous> (C:\Users\Giacomo\AppData\Local\atom\app-1.12.6\resources\app\apm\node_modules\npm-registry-c
lient\lib\request.js:153:7)
    at emitOne (events.js:77:13)
    at Request.emit (events.js:169:7)
    at ClientRequest.<anonymous> (C:\Users\Giacomo\AppData\Local\atom\app-1.12.6\resources\app\apm\node_modules\request\
request.js:823:10)
    at emitOne (events.js:82:20)
    at ClientRequest.emit (events.js:169:7)
    at tickOnSocket (_http_client.js:502:7)
    at onSocketNT (_http_client.js:514:5)
(node) warning: possible EventEmitter memory leak detected. 11 error listeners added. Use emitter.setMaxListeners() to i
ncrease limit.
Trace
    at TLSSocket.addListener (events.js:239:17)
    at TLSSocket.Readable.on (_stream_readable.js:673:33)
    at Request.<anonymous> (C:\Users\Giacomo\AppData\Local\atom\app-1.12.6\resources\app\apm\node_modules\npm-registry-c
lient\lib\request.js:153:7)
    at emitOne (events.js:77:13)
    at Request.emit (events.js:169:7)
    at ClientRequest.<anonymous> (C:\Users\Giacomo\AppData\Local\atom\app-1.12.6\resources\app\apm\node_modules\request\
request.js:823:10)
    at emitOne (events.js:82:20)
    at ClientRequest.emit (events.js:169:7)
    at tickOnSocket (_http_client.js:502:7)
    at onSocketNT (_http_client.js:514:5)
(node) warning: possible EventEmitter memory leak detected. 11 error listeners added. Use emitter.setMaxListeners() to i
ncrease limit.
Trace
    at TLSSocket.addListener (events.js:239:17)
    at TLSSocket.Readable.on (_stream_readable.js:673:33)
    at Request.<anonymous> (C:\Users\Giacomo\AppData\Local\atom\app-1.12.6\resources\app\apm\node_modules\npm-registry-c
lient\lib\request.js:153:7)
    at emitOne (events.js:77:13)
    at Request.emit (events.js:169:7)
    at ClientRequest.<anonymous> (C:\Users\Giacomo\AppData\Local\atom\app-1.12.6\resources\app\apm\node_modules\request\
request.js:823:10)
    at emitOne (events.js:82:20)
    at ClientRequest.emit (events.js:169:7)
    at tickOnSocket (_http_client.js:502:7)
    at onSocketNT (_http_client.js:514:5)
(node) warning: possible EventEmitter memory leak detected. 11 error listeners added. Use emitter.setMaxListeners() to i
ncrease limit.
Trace
    at TLSSocket.addListener (events.js:239:17)
    at TLSSocket.Readable.on (_stream_readable.js:673:33)
    at Request.<anonymous> (C:\Users\Giacomo\AppData\Local\atom\app-1.12.6\resources\app\apm\node_modules\npm-registry-c
lient\lib\request.js:153:7)
    at emitOne (events.js:77:13)
    at Request.emit (events.js:169:7)
    at ClientRequest.<anonymous> (C:\Users\Giacomo\AppData\Local\atom\app-1.12.6\resources\app\apm\node_modules\request\
request.js:823:10)
    at emitOne (events.js:82:20)
    at ClientRequest.emit (events.js:169:7)
    at tickOnSocket (_http_client.js:502:7)
    at onSocketNT (_http_client.js:514:5)
(node) warning: possible EventEmitter memory leak detected. 11 error listeners added. Use emitter.setMaxListeners() to i
ncrease limit.
Trace
    at TLSSocket.addListener (events.js:239:17)
    at TLSSocket.Readable.on (_stream_readable.js:673:33)
    at Request.<anonymous> (C:\Users\Giacomo\AppData\Local\atom\app-1.12.6\resources\app\apm\node_modules\npm-registry-c
lient\lib\request.js:153:7)
    at emitOne (events.js:77:13)
    at Request.emit (events.js:169:7)
    at ClientRequest.<anonymous> (C:\Users\Giacomo\AppData\Local\atom\app-1.12.6\resources\app\apm\node_modules\request\
request.js:823:10)
    at emitOne (events.js:82:20)
    at ClientRequest.emit (events.js:169:7)
    at tickOnSocket (_http_client.js:502:7)
    at onSocketNT (_http_client.js:514:5)
gyp ERR! configure error
gyp ERR! stack Error: Python executable "C:\Users\Giacomo\AppData\Local\Programs\Python\Python35\python.EXE" is v3.5.1,
which is not supported by gyp.
gyp ERR! stack You can pass the --python switch to point to Python >= v2.5.0 & < 3.0.0.
gyp ERR! stack     at failPythonVersion (C:\Users\Giacomo\AppData\Local\atom\app-1.12.6\resources\app\apm\node_modules\n
ode-gyp\lib\configure.js:454:14)
gyp ERR! stack     at C:\Users\Giacomo\AppData\Local\atom\app-1.12.6\resources\app\apm\node_modules\node-gyp\lib\configu
re.js:443:9
gyp ERR! stack     at ChildProcess.exithandler (child_process.js:204:7)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at maybeClose (internal/child_process.js:827:16)
gyp ERR! stack     at Socket.<anonymous> (internal/child_process.js:319:11)
gyp ERR! stack     at emitOne (events.js:77:13)
gyp ERR! stack     at Socket.emit (events.js:169:7)
gyp ERR! stack     at Pipe._onclose (net.js:477:12)
gyp ERR! System Windows_NT 10.0.14931
gyp ERR! command "C:\\Users\\Giacomo\\AppData\\Local\\atom\\app-1.12.6\\resources\\app\\apm\\bin\\node.exe" "C:\\Users\\
Giacomo\\AppData\\Local\\atom\\app-1.12.6\\resources\\app\\apm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Giacomo\AppData\Local\Temp\apm-install-dir-116114-5988-eh894t\node_modules\linter-xo\node_modules\
buffer-offset-index
gyp ERR! node -v v4.4.5
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\Giacomo\AppData\Local\Temp\apm-install-dir-116114-5988
-eh894t\package.json'
npm WARN apm-install-dir-116114-5988-eh894t No description
npm WARN apm-install-dir-116114-5988-eh894t No repository field.
npm WARN apm-install-dir-116114-5988-eh894t No README data
npm WARN apm-install-dir-116114-5988-eh894t No license field.
npm ERR! Windows_NT 10.0.14931
npm ERR! argv "C:\\Users\\Giacomo\\AppData\\Local\\atom\\app-1.12.6\\resources\\app\\apm\\bin\\node.exe" "C:\\Users\\Gia
como\\AppData\\Local\\atom\\app-1.12.6\\resources\\app\\apm\\node_modules\\npm\\bin\\npm-cli.js" "--globalconfig" "C:\\U
sers\\Giacomo\\.atom\\.apm\\.apmrc" "--userconfig" "C:\\Users\\Giacomo\\.atom\\.apmrc" "install" "C:\\Users\\Giacomo\\Ap
pData\\Local\\Temp\\d-116114-5988-1lhu3xi\\package.tgz" "--runtime=electron" "--target=1.3.9" "--arch=ia32" "--global-st
yle"
npm ERR! node v4.4.5
npm ERR! npm  v3.10.5
npm ERR! code ELIFECYCLE

npm ERR! buffer-offset-index@0.0.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the buffer-offset-index@0.0.1 install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the buffer-offset-index package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs buffer-offset-index
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls buffer-offset-index
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\Giacomo\AppData\Local\Temp\apm-install-dir-116114-5988-eh894t\npm-debug.log
npm ERR! code 1

PS = I was undecided if putting this huge error would have been a good thing. If it's too long I'll edit the issue.

sindresorhus commented 7 years ago

@marionebl Why are we depending on text-buffer directly instead of using it from atom?

https://github.com/sindresorhus/atom-linter-xo/blob/1b3ffce91d82488accdcc310236c669fa9bfb6f3/lib/format.js#L2

marionebl commented 7 years ago

Did that to avoid the direct dependency on the virtual "atom" package, which only exists as builtin in atom processes. This way we can do the unit tests without apm.

giacomocerquone commented 7 years ago

Passed over it installing 0.21.0 When you'll solve this I'll update 😄 PS: Same problem also on my windows 10 desktop machine

marionebl commented 7 years ago

I'd like to keep the unit tests somewhat independent of actual apm-started processes @sindresorhus. Perhaps we could revert to using the atom builtin and provide a mock based on text-buffer for it, moving the dependency on it to devDependencies? Perhaps this could do away with the rebuild steps on Tavis.

sindresorhus commented 7 years ago

@marionebl Yes, let's do that. We shouldn't have anything in dependencies that requires a native build-step.

marionebl commented 7 years ago

@sindresorhus I think it would make sense to run tests on AppVeyor to avoid stuff like this in the future