bun icon indicating copy to clipboard operation
bun copied to clipboard

Bun REPL in VS Code terminal on Windows outputs error

Open ozy-s opened this issue 10 months ago • 2 comments

What version of Bun is running?

1.2.3+8c4d3ff80

What platform is your computer?

Windows 11

What steps can reproduce the bug?

run bun repl in VS code terminal

What is the expected behavior?

No response

What do you see instead?

"stackTrace":{"callFrames":[{"functionName":"","url":"C:\\Users\\m\\AppData\\Local\\Temp\\bunx-315143448-bun-repl@latest\\node_modules\\bun-repl\\src\\repl.ts","scriptId":"2","lineNumber":136,"columnNumber":22}]}}}}"}],"stackTrace":{"callFrames":[{"functionName":"","url":"C:\Users\m\AppData\Local\Temp\bunx-315143448-bun-repl@latest\node_modules\bun-repl\src\repl.ts","scriptId":"2","lineNumber":136,"columnNumber":22}]}}}}

Additional information

Only happens in VS Code terminal. Regular terminal is fine.

ozy-s avatar Feb 22 '25 21:02 ozy-s

Bumping, still happening in 1.3.4+5eb2145b3

headquarter8302 avatar Dec 07 '25 09:12 headquarter8302

If you unset BUN_INSPECT_CONNECT_TO before running bun repl, it should work.

Context is vscode extension has a socket connection allows errors to be shown inline in ide, and something about https://github.com/jhmaster2000/bun-repl seems to be using some low level api that intercepting it. In https://github.com/oven-sh/bun/pull/15594, I made it try to remove those env vars automatically but I'm not sure why it isn't working for windows yet (maybe it reuses some of itself that already knew about the connection).

RiskyMH avatar Dec 07 '25 11:12 RiskyMH