-
Notifications
You must be signed in to change notification settings - Fork 30.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Linux Subsystem on Windows: EINVAL error when piping into Node in a cmd.exe started from bash #18638
Comments
Update: this also breaks meaning that it's not about the pipe but rather the startup of Node itself.
|
Yup got the same error with latest LTS of Node, anyone knows of a workaround? |
With node 9.5.0 for me |
This is an issue with the WSL, not Node - Try running Linux version of Node. You can also try redirecting Node output to a real pipe (e.g. by adding |
when i run libuv in windows: uv_pipe_t stdin_;
uv_pipe_init(uv_default_loop(), &stdin_, 0);
uv_pipe_open(&stdin_, 0); // return EINVAL in windows, after dig into the source , i found the lasterror from |
I have a bash script that runs a cmd that pipes something into the Node.js executable under Windows. Like this:
I get the following error:
This script worked perfectly until the recent major Windows update. And even now both of the following lines are good.
But somehow the
cmd.exe
piping breaks Node if it is started from Linux. I don't know if this belongs to the Node.js team or the guys at Microsoft broke something. Anyway, looking forward to see some analysis.PS. My Stack Overflow question is here:
https://stackoverflow.com/questions/48670794/linux-subsystem-on-windows-node-js-einval-error
The text was updated successfully, but these errors were encountered: