-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
fix(gatsby): Silence process.send Error #32744
Conversation
We could also potentially check status of |
Which additional benefit would give us that? 🤔 When adding a log before the success Writing page-data.json files to public directory -
0.200s - 3/5 24.95/s
^C
{ isConnected: true }
{ isConnected: true }
{ isConnected: false }
minimal on main [!?] is 📦 v1.0.0 via ⬢ v14.16.1 took 13s
➜ But without the error handler we get: success Writing page-data.json files to public directory -
0.184s - 3/5 27.10/s
^C
{ isConnected: true }
{ isConnected: true }
ERROR
UNHANDLED REJECTION write EPIPE
Error: write EPIPE
- child_process.js:832 ChildProcess.target._send
internal/child_process.js:832:20
- child_process.js:703 ChildProcess.send
internal/child_process.js:703:19
- develop.ts:135 ControllableScript.stop
[minimal]/[gatsby]/src/commands/develop.ts:135:22
- develop.ts:540 shutdownServices
[minimal]/[gatsby]/src/commands/develop.ts:540:28
- develop.ts:467 process.<anonymous>
[minimal]/[gatsby]/src/commands/develop.ts:467:11
{ isConnected: true }
{ isConnected: true }
minimal on main [!?] is 📦 v1.0.0 via ⬢ v14.16.1 took 10s
➜ So the error handler is really doing the work here 😆 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks 👍
(cherry picked from commit 5d7831d)
Published in |
Description
As per https://nodejs.org/api/child_process.html#child_process_subprocess_send_message_sendhandle_options_callback:
So we provide a callback now so that it doesn't emit an 'error' event.
Related Issues
Fix #28011
[ch35874]