honojs / honox

HonoX - Hono based meta framework
https://hono.dev
MIT License
1.64k stars 43 forks source link

`Bun.serve()` did not return a Response object. #91

Closed ryuujo1573 closed 8 months ago

ryuujo1573 commented 8 months ago

What version of HonoX are you using?

0.1.3+2

What steps can reproduce the bug?

Use dev container to setup environment, and bun i then bun dev in the container. Here's my boilerplate to reproduce the bug. https://github.com/ryuujo1573/blue/tree/a23b3b0099b9be3043116c33c18f2431f0dcf077

Everything should be ok, as it is fine in my wsl2 host (ubuntu focal).

What is the expected behavior?

No response

What do you see instead?

image

Additional information

No response

yusukebe commented 8 months ago

Hi @ryuujo1573

Don't use bun dev. Use bun run dev instead of it.

ryuujo1573 commented 8 months ago

Hi @ryuujo1573

Don't use bun dev. Use bun run dev instead of it.

ご回答ありがとうございます。 I have tried bun run dev instead of the short cut bun dev and the issue still exists. Maybe there's something wrong with containerized environment?

ryuujo1573 commented 8 months ago

I just figured out that I have not install node on dev container, so it might be executing vite with bun runtime instead of respecting the shebang of .bin/vite.

In conclusion, use bun --bun dev to call vite could reproduce the issue.

yusukebe commented 8 months ago

@ryuujo1573

In conclusion, use bun --bun dev to call vite could reproduce the issue.

Yeah. It does not support running on Bun. It may run on Bun in the future, but for now, please run Vite on Node.js.