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

"React is not defined" Error when using Solid.js #3535

Open
glitch-txs opened this issue Feb 23, 2025 · 3 comments
Open

"React is not defined" Error when using Solid.js #3535

glitch-txs opened this issue Feb 23, 2025 · 3 comments
Labels
information needed Further information is requested

Comments

@glitch-txs
Copy link

Which project does this relate to?

Router

Describe the bug

This is a basic Solidjs template, I tried integrating Tanstack Router but it seems it depends on React. (I'm using vite)

Image

Your Example Website or App

N/A

Steps to Reproduce the Bug or Issue

  1. Create a Solidjs project running npx degit solidjs/templates/js nombre-app as stated in Solidjs docs
  2. Integrate Tanstack Router following the Quick Start
  3. Instead of using main replace index.tsx since it's the entry point Solid actually uses (docs are wrong in this part)
  4. Run the project.
  5. "React is not defined" error shows up

Expected behavior

The package should'nt depend on React.

Screenshots or Videos

No response

Platform

  • OS: Windows
  • Browser: Chrome
  • Version: [e.g. 91.1]

Additional context

No response

@schiller-manuel
Copy link
Contributor

cc @birkskyum @brenelz

@brenelz
Copy link
Contributor

brenelz commented Feb 23, 2025

You are using vite-plugin-solid in your vite.config.js? Thats kinda odd that is showing up.

We have a vite template here that we had tested
https://github.com/solidjs/templates/tree/main/tanstack-router-file-based

@SeanCassiere
Copy link
Member

You are using vite-plugin-solid in your vite.config.js? Thats kinda odd that is showing up.

We have a vite template here that we had tested solidjs/templates@main/tanstack-router-file-based

@glitch-txs did you try the solution mentioned above?

@SeanCassiere SeanCassiere added the information needed Further information is requested label Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
information needed Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants