fork child process does not receive message event when using ES modules #34785
Labels
child_process
Issues and PRs related to the child_process subsystem.
esm
Issues and PRs related to the ECMAScript Modules implementation.
wontfix
Issues that will not be fixed.
steps to reproduce the bug
im trying to have two way messaging between child process and the parent process, the parent process works as expected it sends and receives messages from child process, but the child process is only able to send message and not receive them
ive enabled ES6 modules from
package.json
using this key-value"type": "module"
app.js
script.js
expected behavior
output recieved
Additional information
this issue is not present while using commonJs modules (ie: require('child_process') )
same issue closed without bug fix, nodejs/help#1383
although the workaround would be to call the child.send in the next tick like shown below, this is not homologous to the commonJs behavior
The text was updated successfully, but these errors were encountered: