say.js icon indicating copy to clipboard operation
say.js copied to clipboard

this.child.stdin.setEncoding is not a function w/ Bun

Open dillonstreator opened this issue 1 year ago • 2 comments

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

dillonstreator avatar Aug 15 '24 16:08 dillonstreator

Same issue

ghost avatar Oct 10 '24 19:10 ghost

my solution is commenting line 35, 36 in base.js

one0410 avatar Dec 19 '24 14:12 one0410