Nitro Websocket issues when using Bun
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 11.2k
- Forks
- 899
- Avg merge
- 2d 24m
- Merged PRs (30d)
- 40
Description
Environment
Operating System: Linux
Node Version: v22.12.0
Nuxt Version: 3.15.2
CLI Version: 3.20.0
Nitro Version: 2.10.4
Package Manager: bun@1.1.43
Builder: -
User Config: compatibilityDate, devtools
Runtime Modules: -
Build Modules: -
Reproduction
https://github.com/felixrydberg/bun-node-nitro-websocket-issue
Describe the bug
There is an issue when running Nitro with Bun. When using Node a catch all route will capture both Websocket and REST calls, while Bun will only capture REST calls.
Additional context
If anyone comes across this and the issue has been closed, there is also an issue on Buns github about this: https://github.com/oven-sh/bun/issues/16447
Logs
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked bun-node-nitro-websocket-issue reproduction and run it under Bun and Node, focusing on the catch-all route's handling of WebSocket and REST requests. Compare the behavior with Nitro 2.10.4 and the related Bun issue; done means the catch-all route handles both request types consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- bun, node.js, nuxt, typescript
- Domain
- api, backend, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100