EINVAL errors (events.js:160) with Node 7.1.0 on Windows 10
- Version:
7.1.0 - Platform:
Windows 10 - Subsystem:
Events
Hej there,
several users have problems with different packages running node 7.1.0 on Windows 10:
- https://github.com/mochajs/mocha/issues/2577
- https://github.com/facebook/react-native/issues/10824
- https://github.com/electron/electron/issues/7919
- https://github.com/yeoman/yo/issues/485
- https://github.com/yeoman/yo/issues/486
All of them seem to have the following in common:
- It used to work with node 7.0.0 and stopped working with 7.1.0
- A similiar error with different stacktrace:
events.js:160
throw er; // Unhandled 'error' event
Error: write EINVAL
Could you enlighten us? Is it a regression in Node.js?
Thanks, Michael
@cjihrig @icflorescu Node.js v7.1.0 + latest libuv v1.x branch seems to be working fine with both https://github.com/kyrylkov/webpack and mocha
Here is the latest Win 64-bit build of node.exe to verify:
https://mega.nz/#!WIlB0DaC!wIiY0Nv3sI0NvXODdXHqjK4kgoEso3s7kcE-RmiZ8uA
FYI - I plan to start on the libuv release soon.
@cjihrig Great!
@kyrylkov : Your binary does the trick for me. Complex webpack project is working, including console color support.
libuv update PR is at https://github.com/nodejs/node/pull/9647, if anyone wants to give it a whirl.
@kyrylkov : The new binary works for me too, so I guess it's ok to push. @kyrylkov and @cjihrig : You're doing an awesome job!
@cjihrig I'll make another build
@cjihrig Verified. Node.js master branch with libuv 1.10.0 fails https://github.com/kyrylkov/webpack, but PR https://github.com/nodejs/node/pull/9647 fixes the issue.
I'd like to test this. I may have a related issue with bluebird/request-promise, documented at https://github.com/request/request-promise/issues/166. It silently fails only in Windows + v7.1.0.
PS: I've never had reason to test with a dev branch, but would be willing to contribute. Some instructions would be helpful though. :) Or, the script that shows the flaw can be found in the request-promise ticket, if someone wants to test with it.
Also, have a similar silently failing return initially logged in https://github.com/vitaly-t/pg-promise/issues/236? Distinction in both cases is no error percolates up...
ESLint received a bug report from @danZib a few days ago that seems to also be related to the libuv upgrade (windows-only IO failure on Node 7). I'll add it to this issue in case it's related.
Error message:
events.js:160
throw er; // Unhandled 'error' event
^
Error: This socket is closed
at WriteStream.Socket._writeGeneric (net.js:683:19)
at WriteStream.Socket._write (net.js:734:8)
at doWrite (_stream_writable.js:334:12)
at writeOrBuffer (_stream_writable.js:320:5)
at WriteStream.Writable.write (_stream_writable.js:247:11)
at WriteStream.Socket.write (net.js:661:40)
at Console.log (console.js:43:16)
at process.once.err (C:\Users\Daniel\AppData\Roaming\npm\node_modules\eslint\bin\eslint.js:50:17)
at process.g (events.js:292:16)
at emitOne (events.js:96:13)
It apparently happens on a console.log call when this code is run. It only fails on windows, and only with Node 7. (I didn't encounter the issue myself, so I'm unable to verify whether libuv 1.10.1 fixes the issue.)
In which version will this rollback land? 7.1.1?
There is a Node v7 release tentatively scheduled for this coming Tuesday. I believe it will be 7.1.1. If any semver minor commits are included, it will be 7.2.0.
Hello, on my windows 10, I uninstalled node v 7.1.0 and reinstalled 6.9.1, and it worked normally ...
The error was:
Error: This socket is closed at WriteStream.Socket._writeGeneric (net.js:683:19) at WriteStream.Socket._write (net.js:734:8) at doWrite (_stream_writable.js:334:12) at writeOrBuffer (_stream_writable.js:320:5) at WriteStream.Writable.write (_stream_writable.js:247:11) at WriteStream.Socket.write (net.js:661:40) at WriteStream.stream.write (C:\Users\m.nunes.abrantes\Documents\Projeto\react_ative\testereact\node_modules\ansi\lib\newlines.js:36:21) at Console.warn (console.js:51:16) at process.on (internal/process/warning.js:21:17) at emitOne (events.js:96:13)
I'm pretty sure it's fixed in the nightlies, or wait for 7.1.1
@seanzer, 7.1.1 nightly was release on Nov 9th. That did not fix the problem. I'm waiting for a new release which is supposed to happen tonight. @AbrantesMar, 7.0.0 works fine as well.
Feedback: Node 7.2.0, released last night, has solved my problem, which was serving Angular CLI projects on Windows 10. Thank you!
Node 7.2 also resolved my problem with react-native run-android on Win10
We're trying to bring back to libuv the functionality that caused this regression (with fixes, of course). Before merging it, it would be great if someone could confirm that it does not cause any problems. The PR in question is: https://github.com/libuv/libuv/pull/1143. Thanks in advance. /cc @kyrylkov
@santigimeno So current Node v7.2.0 or v7.x branch plus libuv with https://github.com/libuv/libuv/pull/1143 ?