say.js
say.js copied to clipboard
this.child.stdin.setEncoding is not a function w/ Bun
Running the following program with Bun:
import say from "say";
say.speak("testing");
Result in the error:
30 |
31 | let { command, args, pipedData, options } = this.buildSpeakCommand({ text, voice, speed })
32 |
33 | this.child = childProcess.spawn(command, args, options)
34 |
35 | this.child.stdin.setEncoding('ascii')
^
TypeError: this.child.stdin.setEncoding is not a function. (In 'this.child.stdin.setEncoding("ascii")', 'this.child.stdin.setEncoding' is undefined)
https://github.com/oven-sh/bun/issues/11011#issuecomment-2291693731
Same issue
my solution is commenting line 35, 36 in base.js