invoking npm with cp.spawn doesn't work on windows
Closed this issue · 7 comments
ForbesLindesay commented
This fails on windows with the error:
events.js:72
throw er; // Unhandled 'error' event
^
Error: spawn ENOENT
at errnoException (child_process.js:1001:11)
at Process.ChildProcess._handle.onexit (child_process.js:792:34)
because you can't use spawn
to invoke npm on windows.
3rd-Eden commented
So we should .exec
instead?
ForbesLindesay commented
Yes, if possible. Alternatively if it really must be spawn you can use something like https://github.com/ForbesLindesay/win-spawn
alessioalex commented
@3rd-Eden I can confirm that after installing the forked module from @JGAntunes it worked fine on Windows.
noyobo commented
pre-commit version is 0.0.9 published 7 months ago
This doesn't work on Windows,
Can publish a new version ?
3rd-Eden commented
I'm going to close this as I assume that current master fixes all the things.
noyobo commented
👍 Thank you