-
Notifications
You must be signed in to change notification settings - Fork 13
Common Errors
Here are some errors that have been seen in projects using solid-three
.
Solid-three's render function is not intended for top-level use to render a root,
so the normal solid-js/web
render function should be used for the root of your application.
If you mistakenly import render
from solid-three
, you'll see an error about "unable to attach",
as the solid-three
renderer is trying to deal with a DOM node.
TODO: reproduce and provide sample code and the actual error message, and link to more docs.
Renderer use is actually dictated at compile time by the Babel plugin, which must be
configured for generate: "dynamic"
with the "dom"
renderer falling through to the "universal"
renderer.
If you forget to update vite.config.ts
with this configuration, you'll see an error
when the usual solid-js/web
DOM renderer tries to attach a mesh, light, or whatever to the <canvas/>
DOM element.
TODO: reproduce and provide sample code and the actual error message, and link to more docs.
If your development server pulls in two or more copies of SolidJS, due to version dependency problems,
you may see strange problems. At least one possible symptom is a "no root for object: ...", resulting from
a null return from useContext(ThreeContext)
. Check your node_modules
for any nested node_modules
folders,
particularly under solid-three
.
TODO: reproduce and provide sample code and the actual error message, and link to more docs.