BUG: SSG build crashes with WritableStream error — 4 articles not built #53

Closed
opened 2026-06-09 21:35:05 +00:00 by glow · 1 comment
Owner

Description

The Qwik SSG build crashes mid-way with a Bun compatibility error:

worker error TypeError [ERR_INVALID_ARG_TYPE]: The "transform.writable" property must be an instance of WritableStream. Received an instance of Object

Only 8 of 12 articles get built. 4 article pages missing from dist/ and return 404:

  • how-to-fix-a-squeaky-floor
  • how-to-fix-running-toilet
  • how-to-install-a-ceiling-fan
  • how-to-patch-drywall

Build log

Starting Qwik City SSG...
worker error TypeError [ERR_INVALID_ARG_TYPE]: The "transform.writable" property...
    at InternalReadableStream.pipeTo (node:internal/webstreams/readablestream:411:15)

Suggested Fixes

  1. Use Node.js for the build (install Node.js 22+, run `npm run build`)
  2. Set `maxWorkers: 1` in the static adapter config
  3. Upgrade Qwik to check if v1.21+ fixes Bun compatibility
## Description The Qwik SSG build crashes mid-way with a Bun compatibility error: ``` worker error TypeError [ERR_INVALID_ARG_TYPE]: The "transform.writable" property must be an instance of WritableStream. Received an instance of Object ``` Only **8 of 12** articles get built. 4 article pages missing from dist/ and return 404: - how-to-fix-a-squeaky-floor - how-to-fix-running-toilet - how-to-install-a-ceiling-fan - how-to-patch-drywall ## Build log ``` Starting Qwik City SSG... worker error TypeError [ERR_INVALID_ARG_TYPE]: The "transform.writable" property... at InternalReadableStream.pipeTo (node:internal/webstreams/readablestream:411:15) ``` ## Suggested Fixes 1. Use Node.js for the build (install Node.js 22+, run \`npm run build\`) 2. Set \`maxWorkers: 1\` in the static adapter config 3. Upgrade Qwik to check if v1.21+ fixes Bun compatibility
glow closed this issue 2026-06-09 21:37:51 +00:00
Author
Owner

Fixed in commit dcb683b

Changed staticAdapter() in adapters/static/vite.config.ts to set maxWorkers: 1, limiting parallel HTML generation to a single worker. This avoids the Bun incompatibility where WritableStream.pipeTo crashes with ERR_INVALID_ARG_TYPE when multiple workers try to write concurrently.

Closes #53

**Fixed in commit dcb683b** Changed `staticAdapter()` in `adapters/static/vite.config.ts` to set `maxWorkers: 1`, limiting parallel HTML generation to a single worker. This avoids the Bun incompatibility where `WritableStream.pipeTo` crashes with `ERR_INVALID_ARG_TYPE` when multiple workers try to write concurrently. Closes #53
Sign in to join this conversation.
No labels
bug
feature
improvement
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
glow/first-home-diy#53
No description provided.