Skip to content

fix, h3 cant handle solid stream#2134

Open
GregorLohaus wants to merge 1 commit intosolidjs:mainfrom
GregorLohaus:main
Open

fix, h3 cant handle solid stream#2134
GregorLohaus wants to merge 1 commit intosolidjs:mainfrom
GregorLohaus:main

Conversation

@GregorLohaus
Copy link
Copy Markdown

What is the current behavior?

In createBaseHandler (packages/start/src/server/handler.js), when USING_SOLID_START_DEV_SERVER is true, the raw Solid stream from renderToStream is returned directly to avoid a
TransformStream cancellation crash. However, createBaseHandler now wraps the handler in an H3 app (new H3() + app.use(handler)). The dev server in dev-server.js calls
serverEntry.default.fetch(webReq) — which is H3.fetch(). h3's response pipeline (toResponse → prepareResponse → prepareResponseBody) doesn't recognize the Solid
stream object (it's not a Response, ReadableStream, string, or any known type), so it falls through to { body: val }. When srvx's sendNodeResponse writes this to the
Node response via nodeRes.write(), the object is coerced to the string "[object Object]", which is all the browser receives.

What is the new behavior?

The dev server path pipes the Solid stream through a TransformStream and wraps the readable side in a standard Response, which h3 handles natively. This matches what
the non-dev code path already does (pipe through TransformStream), with the addition of the Response wrapper so h3 passes it through without transformation.

Other information

@netlify
Copy link
Copy Markdown

netlify bot commented Apr 8, 2026

Deploy Preview for solid-start-landing-page ready!

Name Link
🔨 Latest commit 5b0bf02
🔍 Latest deploy log https://app.netlify.com/projects/solid-start-landing-page/deploys/69d6794c0ab14f0009a19735
😎 Deploy Preview https://deploy-preview-2134--solid-start-landing-page.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 8, 2026

⚠️ No Changeset found

Latest commit: 5b0bf02

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Apr 8, 2026

Open in StackBlitz

npm i https://pkg.pr.new/solidjs/solid-start/@solidjs/start@2134
npm i https://pkg.pr.new/solidjs/solid-start/@solidjs/vite-plugin-nitro-2@2134

commit: 5b0bf02

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug?]: Bun create solid results in broken application.

2 participants