#How to debug bun compile

1 messages · Page 1 of 1 (latest)

olive palm
#

@alpine linden have you ran into similar issues?

#

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
alpine linden
#

Is it using top level await

olive palm
#

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

alpine linden
#

Sourcemap was giving parsing errors

Can you screenshot this

olive palm
#

When I add sourcemap flag

#

This syntaxerror message shows up

alpine linden
#

Okay that’s interesting

#

What if you do —sourcemap=external

olive palm
#

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?