elysiajs / elysia

Ergonomic Framework for Humans
https://elysiajs.com
MIT License
10.59k stars 226 forks source link

bun build cause Elysia to panic on cluster mode #835

Open SaltyAom opened 2 months ago

SaltyAom commented 2 months ago

From https://github.com/oven-sh/bun/issues/14027

What version of Bun is running?

1.1.28

What platform is your computer?

Darwin 24.0.0 arm64 arm

What steps can reproduce the bug?

  1. Clone repro
git clone http://github.com/saltyaom/elysia-cluster-demo
  1. Build
cd elysia-cluster-demo && bun run build
  1. Run
bun ./dist/index.js

What is the expected behavior?

It should not crash

What do you see instead?

TypeError: Y of p1 is not a function. (In 'Y of p1(H)', 'Y of p1' is undefined)

Additional information

Bundled code using Bun build cause panic on run.

This error only happens on Bun 1.1.28 and not on previous versions.

w01fgang commented 2 months ago

I couldn't reproduce this, for me it doesn't crash. But actually, it doesn't act as a cluster, only the first instance is responding.


bun -v 1.1.29