Uncaught ReferenceError: React is not defined
Hello! I am using "solid-js": "^1.7.5" and
"solid-start": "^0.2.32" for my solidjs project, but i'm getting this javascript-disabling bug! The full console error is below, any help is appreciated! ❤️
and the vite.config.ts was like this out of the box:
20 Replies
Do you use any packages?
and my tsconfig:
it's such a weird bug, like why would solidjs require React lol. i even checked the node_modules files and it's all solid solidjs
well... it probably doesn't
fwiw it might be flowbite
you'd have to check by commenting out imports
if removing flowbite fixes it... well, then it's flowbite
let me try that out first
was not that
let me try one more thing
no it didn't work, and the error is stemming from the solid-start package via vercel init
I'm not sure if that adapter is needed or up-to-date
3 months since last update
the adapters themselves are deprecated. TBF he's using a version of solid-start that is no longer supported
it's most likely something to do with the vite plugin. It maybe installing the most recent one
I recall this issue being brought up months ago
do i need to bump down the version?
or should i try another version of solid-start somewhere? and thanks for the responses!
via resolutions I think, can you check the lockfile?
check which version of vite-plugin-solid is getting installed
I'm not sure which version of old solid-start is meant to be supported
vite-plugin-solid "^2.7.0"
is that what the lockfile is pointing to
what package manager are you using
yarn
pnpm seemed to also have the issue
it worked for a little while on yarn and then all of a sudden
because this seems like a "dependency info" not the actual package version
oh
okay so it resolved to 2.9.1
You'd want to downgrade that
so you want to install "vite-plugin-solid": "2.7.2" as an exact version
instead of this i should use
vite-plugin-solid
instead?no, solid-start uses vite-plugin-solid internally
but it's using the recent one
and since the old solid-start only works with the old vite-plugin
i looked at the other package versions too and hard coded exact versions; still, it persists
have you used
resolutions
to enforcenpm-force-resolutions?
Or just adding a resolutions field to package.json?
Trying it now
....that worked ❤️
thanks you for your help and for your patience 🙂
@lxsmnsyc 🤖 Should solid-refresh also be pinned to an old version for old solid-start beta1 or is v0.7.4 fine? 😅