You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I run the ts file with bunjs, readline doesn't work. If I run my ts file with bunjs, I can't type any characters in the terminal. But if I run it with "tsx" it works. These are my codes:
import readline from 'readline';
constrl=readline.createInterface({input: process.stdin,output: process.stdout});rl.question('What is your name? ',(answer)=>{console.log(`Hello, ${answer}!`);rl.close();});
This is what happened:
With tsx:
root@NL-200:/home/user/my-typescript-prompt-project/src# bunx tsx index.ts
What is your name? Name
Hello, Name!
With bun:
root@NL-200:/home/user/my-typescript-prompt-project/src# bun index.ts
What is your name?
No characters can be entered here
What is the expected behavior?
No response
What do you see instead?
No response
Additional information
I have a question. I have two VPS ubuntu servers. I ran this project with bunjs on my first VPS ubuntu server and it worked and I can easily type characters in the terminal. But on the second server (i.e. the problem I'm having now is on the second server) it doesn't work when I run this project (I couldn't write any characters in the terminal). WHY?
The text was updated successfully, but these errors were encountered:
What version of Bun is running?
1.1.8+89d25807f
What platform is your computer?
Linux 5.4.0-169-generic x86_64 x86_64
What steps can reproduce the bug?
When I run the ts file with bunjs, readline doesn't work. If I run my ts file with bunjs, I can't type any characters in the terminal. But if I run it with "tsx" it works. These are my codes:
import readline from 'readline';
This is what happened:
With tsx:
With bun:
root@NL-200:/home/user/my-typescript-prompt-project/src# bun index.ts What is your name?
No characters can be entered here
What is the expected behavior?
No response
What do you see instead?
No response
Additional information
I have a question. I have two VPS ubuntu servers. I ran this project with bunjs on my first VPS ubuntu server and it worked and I can easily type characters in the terminal. But on the second server (i.e. the problem I'm having now is on the second server) it doesn't work when I run this project (I couldn't write any characters in the terminal). WHY?
The text was updated successfully, but these errors were encountered: