Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in renderToPipeableStream: ReferenceError: React is not defined #3159

Open
austinm911 opened this issue Jan 14, 2025 · 0 comments
Open

Comments

@austinm911
Copy link

austinm911 commented Jan 14, 2025

Which project does this relate to?

Start

Describe the bug

I have a turborepo monorepo "playground" that contains another existing NextJS app (from the template). Went ahead to add TSS and noticed these errors. Seems related to #2793

Error in renderToPipeableStream: ReferenceError: React is not defined
    at RootComponent (/Users/am/Coding/git/router/apps/playground/src/routes/__root.tsx:38:3)
    at react-stack-bottom-frame (/Users/am/Coding/git/router/node_modules/react-dom/cjs/react-dom-server.node.development.js:8723:18)
...

When importing React and console logging it in _root.tsx and uncommenting out the NotFound component in router.tsx

Error in renderToPipeableStream: ReferenceError: React is not defined
    at defaultNotFoundComponent (/Users/am/Coding/git/router/apps/playground/src/router.tsx:21:61)
    at react-stack-bottom-frame (/Users/am/Coding/git/router/node_modules/react-dom/cjs/react-dom-server.node.development.js:8723:18)
...

Your Example Website or App

https://github.com/austinm911/router/tree/renderToPipeableStream-bug

Steps to Reproduce the Bug or Issue

  1. Go to apps/playground and run dev server
  2. You see see the error
  3. Import React and uncomment NotFound as described above

Expected behavior

No error

Screenshots or Videos

No response

Platform

Mac

Additional context

No response

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

No branches or pull requests

1 participant