#How to debug bun compile
1 messages · Page 1 of 1 (latest)
This is how it looks without sourcemap tag
$ bun build --compile --minify --bytecode ./index.js --outfile .out/app
[1115ms] minify -26.41 MB (estimate)
[1005ms] bundle 1518 modules
[780ms] compile .out/app
error: Failed to generate bytecode for ./index.js
Is it using top level await
No, if I try it says you can't use top-level await in cjs, but I ran into a bunch of different issues tbh
Only got fixed when I removed sourcemap and bytecode flags both
Sourcemap was giving parsing errors and bytecode was saying failed to compile/create bytecode
Sourcemap was giving parsing errors
Can you screenshot this
Well, it's not verbose
When I add sourcemap flag
This syntaxerror message shows up
Same thing
I could try doing it on my windows instead of nixos repl
If you think that could change sth
bun install took 70s 💀
@alpine linden I found issue
So I tried on windows and it worked
But turns out my linux was on 1.1.34
On 1.1.36 it doesn't happen
So I guess you fixed a bug/regression
Accidetally?