Skip to content

renderToPipeableStream export missing in production build when starting production server with Bun #12568

@meetdave3

Description

@meetdave3

I'm using React Router as a...

framework

Reproduction

When using React Router with Bun, the production server fails to start due to a missing export. While the development server and production build work fine, running the production server results in an error regarding the renderToPipeableStream export not being found.

Reproduction

  1. Clone the repository:

    git clone https://github.com/meetdave3/remix-hono-on-bun.git
    cd remix-hono-on-bun
    git checkout bug/react-router
  2. Install dependencies:

    bun install
  3. Set the .env:

NODE_ENV=production
  1. Build the project:

    bun run build
  2. Try to start the production server:

    bun run start

You will encounter the following error:

Export named 'renderToPipeableStream' not found in module '/node_modules/react-dom/server.bun.js'

System Info

System:
    OS: macOS 14.4.1
    CPU: (10) arm64 Apple M1 Pro
    Memory: 113.19 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 21.7.1 - /opt/homebrew/bin/node
    Yarn: 1.22.19 - /opt/homebrew/bin/yarn
    npm: 10.7.0 - /opt/homebrew/bin/npm
    bun: 1.1.38 - ~/.bun/bin/bun
  Browsers:
    Chrome: 131.0.6778.140
    Edge: 115.0.1901.188
    Safari: 17.4.1
  npmPackages:
    @react-router/dev: ^7.0.2 => 7.0.2 
    @react-router/fs-routes: ^7.0.2 => 7.0.2 
    @react-router/node: ^7.0.2 => 7.0.2 
    @react-router/serve: ^7.0.2 => 7.0.2 
    react-router: ^7.0.2 => 7.0.2 
    vite: ^6.0.2 => 6.0.2

Used Package Manager

npm

Expected Behavior

  • The production server should start successfully after building the project
  • The renderToPipeableStream export should be properly resolved from react-dom/server

Actual Behavior

Export named 'renderToPipeableStream' not found in module '/node_modules/react-dom/server.bun.js'

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions