You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm encountering an error while trying to run a simple project with the ElysiaJS framework and the Apollo plugin. After setting up the project as described in the official documentation and starting the server using bun run dev, I get the following error:
$ bun run --watch src/index.ts
🦊 Elysia is running at localhost:3003
233 | (response as Response).status !== set.status &&
234 | set.status !== 200 &&
235 |((response.status as number) <=300||236 | (response.status as number) > 400)237 | )238 | response = new Response(response.body, { ^error: ReadableStream has already been used at mergeResponseWithSetHeaders (/Users/baran/projects/test/app/node_modules/elysia/src/adapter/web-standard/handler.ts:238:14) at mapResponse (/Users/baran/projects/test/app/node_modules/elysia/src/adapter/web-standard/handler.ts:324:16) at createNativeStaticHandler (/Users/baran/projects/test/app/node_modules/elysia/src/adapter/bun/handler.ts:25:19) at add (/Users/baran/projects/test/app/node_modules/elysia/src/index.ts:730:15) at get (/Users/baran/projects/test/app/node_modules/elysia/src/index.ts:4061:8) at <anonymous> (/Users/baran/projects/test/app/node_modules/@elysiajs/apollo/dist/index.mjs:33:11)
Steps to Reproduce:
Set up a new project using ElysiaJS and Apollo plugin following the official documentation.
Use the following code in index.ts to set up ElysiaJS with Apollo:
import{Elysia}from"elysia";import{apollo,gql}from'@elysiajs/apollo'import{cors}from'@elysiajs/cors'import{typeDefsGql,resolversGql}from"./graphql";constapp=newElysia().use(cors({origin: 'http://localhost'})).use(apollo({typeDefs: typeDefsGql,resolvers: resolversGql,path: "/graphql-api"})).get('/',()=>'hi').listen(3003)console.log(`🦊 Elysia is running at ${app.server?.hostname}:${app.server?.port}`);
What version of Elysia is running?
latest
What platform is your computer?
Darwin 24.3.0 arm64 arm
What steps can reproduce the bug?
I'm encountering an error while trying to run a simple project with the ElysiaJS framework and the Apollo plugin. After setting up the project as described in the official documentation and starting the server using
bun run dev
, I get the following error:Steps to Reproduce:
index.ts
to set up ElysiaJS with Apollo:graphql.ts
:bun run dev
.What is the expected behavior?
The server should start successfully and handle requests without any errors, including handling GraphQL queries and mutations via the Apollo plugin.
What do you see instead?
The server fails to start with the error:
Additional information
bun run dev
andbun run --watch src/index.ts
, but the error persists.package.json
:Have you try removing the
node_modules
andbun.lockb
and try again yet?Yes
The text was updated successfully, but these errors were encountered: