Skip to content

deno task build fails when ssr: false #14401

@lrowe

Description

@lrowe

Reproduction

https://github.com/lrowe/deno-react-router

(deno run -A 'npm:create-react-router@latest' deno-react-router followed by setting ssr: false.)

Then run deno task build and see:

[react-router] The requested module 'react-dom/server' does not provide an export named 'renderToPipeableStream'

System Info

% deno --version
deno 2.5.2 (stable, release, aarch64-apple-darwin)
v8 14.0.365.5-rusty
typescript 5.9.2


% deno run -A 'npm:envinfo' --system --npmPackages '{vite,react-router,@react-router/*}' --binaries --browsers
╭ Warning
│
│  Ignored build scripts for packages:
│  npm:[email protected]
│  npm:@tailwindcss/[email protected]
│
│  Lifecycle scripts are only supported when using a `node_modules` directory.
│  Enable it in your deno config file:
│  "nodeModulesDir": "auto"
╰─

  System:
    OS: macOS 15.3.1
    CPU: (8) arm64 Apple M1
    Memory: 60.06 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 22.14.0 - ~/.nvm/versions/node/v22.14.0/bin/node
    Yarn: 1.22.10 - /opt/homebrew/bin/yarn
    npm: 10.9.2 - ~/.nvm/versions/node/v22.14.0/bin/npm
    Deno: 2.5.2 - ~/.deno/bin/deno
  Browsers:
    Chrome: 140.0.7339.213
    Safari: 18.3
  npmPackages:
    @react-router/dev: ^7.9.2 => 7.9.3 
    @react-router/node: ^7.9.2 => 7.9.3 
    @react-router/serve: ^7.9.2 => 7.9.3 
    react-router: ^7.9.2 => 7.9.3 
    vite: ^7.1.7 => 7.1.7

Used Package Manager

npm

Expected Behavior

deno task build should successfully build when ssr: false as it does when ssr: true.

Actual Behavior

% deno task build
Task build react-router build
vite v7.1.7 building for production...
✓ 44 modules transformed.
build/client/.vite/manifest.json 1.46 kB │ gzip: 0.41 kB
build/client/assets/logo-dark-pX2395Y0.svg 6.10 kB │ gzip: 2.42 kB
build/client/assets/logo-light-CVbx2LBR.svg 6.13 kB │ gzip: 2.43 kB
build/client/assets/root-Dc_0W_VX.css 7.79 kB │ gzip: 2.42 kB
build/client/assets/root-DWBrbSdl.js 1.09 kB │ gzip: 0.62 kB
build/client/assets/home-BjL_nNBQ.js 3.70 kB │ gzip: 1.70 kB
build/client/assets/chunk-NISHYRIK-B1He9qxt.js 115.57 kB │ gzip: 39.30 kB
build/client/assets/entry.client-DG6dFEMS.js 186.52 kB │ gzip: 59.83 kB
✓ built in 1.78s
vite v7.1.7 building SSR bundle for production...
✓ 5 modules transformed.
build/server/.vite/manifest.json 0.23 kB
build/server/assets/server-build-Dc_0W_VX.css 7.79 kB
build/server/index.js 6.02 kB

✓ 1 asset cleaned from React Router server build.
build/server/assets/server-build-Dc_0W_VX.css

✗ Build failed in 104ms
[react-router] The requested module 'react-dom/server' does not provide an export named 'renderToPipeableStream' at file:///Users/lrowe/scratch/deno-react-router/build/server/index.js:6:10
at getPrerenderBuildAndHandler (/Users/lrowe/scratch/deno-react-router/node_modules/.deno/@React-router[email protected]/node_modules/@react-router/dev/dist/vite.js:4114:15)
at handleSpaMode (/Users/lrowe/scratch/deno-react-router/node_modules/.deno/@React-router[email protected]/node_modules/@react-router/dev/dist/vite.js:4122:28)
at Object.handler (/Users/lrowe/scratch/deno-react-router/node_modules/.deno/@React-router[email protected]/node_modules/@react-router/dev/dist/vite.js:3532:13)
at async Promise.all (index 0)
at PluginDriver.hookParallel (/Users/lrowe/scratch/deno-react-router/node_modules/.deno/[email protected]/node_modules/rollup/dist/es/shared/node-entry.js:22335:9)
at /Users/lrowe/scratch/deno-react-router/node_modules/.deno/[email protected]/node_modules/rollup/dist/es/shared/node-entry.js:23417:13
at catchUnfinishedHookActions (/Users/lrowe/scratch/deno-react-router/node_modules/.deno/[email protected]/node_modules/rollup/dist/es/shared/node-entry.js:22779:16)
at buildEnvironment (/Users/lrowe/scratch/deno-react-router/node_modules/.deno/[email protected]/node_modules/vite/dist/node/chunks/dep-Bm2ujbhY.js:33862:64)
at Object.build (/Users/lrowe/scratch/deno-react-router/node_modules/.deno/[email protected]/node_modules/vite/dist/node/chunks/dep-Bm2ujbhY.js:34220:19)
at buildEnvironment (/Users/lrowe/scratch/deno-react-router/node_modules/.deno/@React-router[email protected]/node_modules/@react-router/dev/dist/cli/index.js:1981:5) {
code: "PLUGIN_ERROR",
pluginCode: "ERR_MODULE_NOT_FOUND",
plugin: "react-router",
hook: "writeBundle"
}

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