TanStack / router

🤖 Fully typesafe Router for React (and friends) w/ built-in caching, 1st class search-param APIs, client-side cache integration and isomorphic rendering.
https://tanstack.com/router
MIT License
8.19k stars 649 forks source link

[start]: preset:bun - Cannot find module "react-dom/server" from "/.output/server/index.mjs" #2180

Closed omarkhatibco closed 2 months ago

omarkhatibco commented 2 months ago

Describe the bug

When setting the preset to bun in deployment.

the generated bundle is not working, it complains about missing react-dom/server

I checked the node_module inside .output folder, react-dom does not include any exports related to server

Your Example Website or App

https://github.com/omarkhatibco/start-test

Steps to Reproduce the Bug or Issue

run cd apps/web2 then bun run build and bun start

Expected behavior

it should work

Screenshots or Videos

No response

Platform

Additional context

I was able to replace react-dom manually and get it to work

SeanCassiere commented 2 months ago

@lithdew could you share any of your insights into using Start with Bun?


Edit: Can confirm that bumping react to the canary channel.

bun add react@canary react-dom@canary

This may be a React (react and react-dom) issue with how it interfaces with Bun.