Skip to content

[BUG] ORPC server returns 400 on production with nuxt adapter when nitro preset = bun #1005

@Prains

Description

@Prains

Environment

"@orpc/client": "^1.8.9",
"@orpc/server": "^1.8.9",
"nuxt": "^4.1.1",

Reproduction

https://github.com/Prains/orpc-nuxt-bun-reproduction

  1. bun i
  2. bun dev
  • open page, everything working correctly
  1. bun i
  2. bun run build
  3. bun run .output/server/index.mjs
  • open page, requests return 400 with Malformed request. Ensure the request body is properly formatted and the 'Content-Type' header is set correctly.

Describe the bug

Hey!

When building nuxt project with nitro preset = bun server return 400 on all requests.

After further investigation i figured out that it happens because body of request returns in Unit8 byte instead of parsed body

it is not quite described in nuxt adapter, so im in loss here. is there any options to solve this without any workarouns?

also please add battle pass, awesome library

Additional context

No response

Logs

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingdocumentationImprovements or additions to documentation

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions