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
Does not work with Windows + Yarn #387
Comments
Ok so this is probably one of the hardest bugs I've had to debug in a long time. This is my current progress of the understanding of that bug. Background
In essence, the parent does this: const {spawn} = require('child_process')
spawn('node', ['child.js'], {stdio: ['inherit', 'inherit', 'inherit', 'pipe']}) The child does this: const {write} = require('fs')
write(3, 'response', console.log) This works. Bug with cmd.exeHowever when using const {spawn} = require('child_process')
spawn('cmd.exe', ['/c', 'node', 'child.js'], {stdio: ['inherit', 'inherit', 'inherit', 'pipe']}) This results in the following error:
This is probably because Issue with cross-spawnThe reason why
Bug with yarnHowever @"C:\Program files\nodejs\node.exe" %* That file exists because of Yarn Plug'n'Play and it's basically a hack as well. When calling I am still investigating this issue, just wanted to report my progress. |
I fixed this problem by using Fixed at #388. This is released by |
This is fixed in the latest version of |
Woot! @ehmicky all working great on my system now! Confirmed that there is no hanging any longer, also. Great job on getting this hammered out. Nice to see this fixed in the |
See #318.
Environment: Windows 10, either
cmd.exe
or Git Bash.Example repository: https://github.com/talves/netlify-plugin-debug
Running
yarn run netlify-build
printsEBADF
errors.Running
npx netlify-build
works though.The text was updated successfully, but these errors were encountered: