Bun prints in console [maybe the full] source code of a bundled JS app on console.error(error)
of caught exceptions (WHY?), while node
, ts-node
& tsx
work OK as expected (don't print it)
#9629
Labels
bug
Something isn't working
What version of Bun is running?
1.0.26+c75e768a6
What platform is your computer?
Linux 6.5.0-1016-gcp x86_64 unknown
What steps can reproduce the bug?
Below are the repro steps.
But first, an important thing:
I import an external package (e.g.
react
). It could be any other.Of course the problem reproduces without large source code (your own or external libraries, like
react
).But, to explicit reproduce the problem and see it exactly, for clarity, we need a relatively large codebase. The easiest and shortest way - import some package.
Reproducing:
bun run build
bun start:bun
// THE ISSUE HERE. You will see the verbose output of the source code of the appbun start:tsx
orbun start:node
orbun start:ts-node
// All of them work ok as expectedWhat is the expected behavior?
It should print in console only the error data, NOT an application source code.
What do you see instead?
Source code of an app in console.
Additional information
console.error()
, but withconsole.log()
and maybe with other methods too.The text was updated successfully, but these errors were encountered: