Skip to content

fix start dev server stream response#2148

Closed
jojo8356 wants to merge 2 commits into
solidjs:mainfrom
jojo8356:fix-dev-server-thenable-stream
Closed

fix start dev server stream response#2148
jojo8356 wants to merge 2 commits into
solidjs:mainfrom
jojo8356:fix-dev-server-thenable-stream

Conversation

@jojo8356
Copy link
Copy Markdown

PR Checklist

Please check if your PR fulfills the following requirements:

What is the current behavior?

With the @solidjs/vite-plugin-nitro-2 setup, the dev server can return the literal string [object Object] for page requests instead of the rendered HTML.

This happens because stream.then is deleted before the USING_SOLID_START_DEV_SERVER branch returns the Solid stream. h3 v2 then no longer treats the returned value as awaitable and handles it as a plain object body.

Fixes #2145.

What is the new behavior?

The dev-server branch now returns the Solid stream with its thenable interface still intact, so h3 can await it and return the rendered HTML.

The then property is still removed before the TransformStream path, so the existing Cloudflare Workers behavior is unchanged.

A regression test was added for the dev-server path.

Other information

Checked locally:

  • pnpm --filter @solidjs/start exec vitest run src/server/handler.spec.ts
  • pnpm --filter @solidjs/start build

Both pass.

One unrelated note: the full pnpm --filter @solidjs/start test:ci run currently fails on src/fns/handler.spec.ts, which imports ./server-functions-handler.ts from the current checkout.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 23, 2026

🦋 Changeset detected

Latest commit: 144ebf0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@solidjs/start Patch

Not sure what this means? Click here to learn what changesets are.

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

@netlify
Copy link
Copy Markdown

netlify Bot commented May 23, 2026

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

Name Link
🔨 Latest commit 144ebf0
🔍 Latest deploy log https://app.netlify.com/projects/solid-start-landing-page/deploys/6a11c004e163d4000882a06c
😎 Deploy Preview https://deploy-preview-2148--solid-start-landing-page.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

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

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 23, 2026

Open in StackBlitz

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

commit: 144ebf0

@jojo8356 jojo8356 closed this by deleting the head repository May 23, 2026
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?]: Dev server returns "[object Object]" with nitroV2Plugin on 2.0.0-alpha.2

2 participants