Strange React not defined error
I've created the bare minimum solidjs + vite app with just and index.html and index.jsx page:
Yet I get this super weird error in the console for the line
render(() => <App/>, document.body);
: Uncaught ReferenceError: React is not defined
10 Replies
Can we see the vite config and tsconfig?
Vite is just this:
I dont have tsconfig ATM, does this matter?
Ah, you're doing plain javascript?
Hmm
yes, well with jsx
I do believe we've had this issue with the js templates before
Need to check the discord history / github issues
Try adding this jsconfig https://github.com/solidjs/templates/blob/master/js/jsconfig.json
GitHub
templates/jsconfig.json at master · solidjs/templates
Vite + solid templates. Contribute to solidjs/templates development by creating an account on GitHub.
seems to have something to do with vite and the vite solid plugin
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Yea I've upgraded and downgraded vite and solid in all sort of combinations, at the end I just used one of the solidjs template, don't know what was wrong with my setup but that is what js development is in 2023
how did you fix this
its blocking our team
using latest vite and solid and normal degit templates