bun
bun copied to clipboard
Invalid stdio option "[object EventEmitter]"
What version of Bun is running?
1.0.3+bab9889601eb13c01ebadb1f47752298259700b6
What platform is your computer?
Darwin 22.4.0 arm64 arm
What steps can reproduce the bug?
Using the repository here, running a basic pm2 script like the following results in Invalid stdio option
.
import pm2 from "pm2";
pm2.start(
{
script: `node`,
args: "myScript.js",
name: "testing"
},
(err, apps) => {
if (err) {
console.log(err);
} else {
console.log("running");
}
}
);
This seems to be mainly an issue with pm2, but I think this is also related to Node.js compatibility with Stream stdio
missing.
What is the expected behavior?
No response
What do you see instead?
No response
Additional information
No response
+1 seeing this when running bunx cdk synth
Error updated slightly! Says Invalid stdio option "ipc"
now rather than just Invalid stdio option
if it helps.
I hate to bother since it's only been a few days, but does anyone know if there's any updates on this issue?
On the latest bun I now get
Error: Invalid stdio option "[object EventEmitter]"
I too am seeing Error: Invalid stdio option "[object EventEmitter]"
. In my case, it is when running nodemon in the package.json dev
script with bun --bun run dev
, and the error was the same in 1.0.3
as in 1.0.4
.
More context if helpful: https://github.com/hwy-js/hwy/issues/4.
[nodemon] 3.0.1
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): .dev/refresh.txt
[nodemon] watching extensions: js,mjs,cjs,json
[nodemon] starting `node dist/main.js`
Error: Invalid stdio option "[object EventEmitter]"
at <anonymous> (node:child_process:355:24)
at map (:1:11)
at spawn (node:child_process:610:8)
at <anonymous> (node:child_process:2:21)
at run (/home/sjc/hwy-bun-test-104/node_modules/nodemon/lib/monitor/run.js:146:23)
at <anonymous> (/home/sjc/hwy-bun-test-104/node_modules/nodemon/lib/nodemon.js:243:9)
at <anonymous> (/home/sjc/hwy-bun-test-104/node_modules/nodemon/lib/config/index.js:82:7)
at processTicksAndRejections (:55:39)
error: Invalid stdio option "[object EventEmitter]"
at node:child_process:356:24
Getting this issue: Error: Invalid stdio option "[object EventEmitter]"
when trying to deploy CDK stack using bun:
bun cdk/stack.ts
I too am seeing
Error: Invalid stdio option "[object EventEmitter]"
. In my case, it is when running nodemon in the package.jsondev
script withbun --bun run dev
, and the error was the same in1.0.3
as in1.0.4
.
I have a similar situation, in nodemon. However, it only is affected when running in fish. When I start the same process in plain bash, the issue does not occur.
bun version 1.0.14, Ubuntu 23.10, nodemon 2.0.22
I faced following error when using pm2 with bun:
[PM2] Spawning PM2 daemon with pm2_home=/home/ubuntu/.pm2
251 | var interpreter = 'node';
252 |
253 | if (which('node') == null)
254 | interpreter = process.execPath;
255 |
256 | var child = require('child_process').spawn(interpreter, node_args, {
^
error: Invalid stdio option "ipc"
at node:child_process:355:47
at map (:1:21)
And installing Node.js runtime resolved the issue.
Still getting this issue and don't really want to download Node on my server for this.
same here, seems bun not ready yet.
Does this still reproduce for you? it appears to be working for me in Bun 1.1.8. (you may need to run bun upgrade
)