You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just started using react-three-fiber yesterday and thought I was losing my mind, glad I'm not the only one having this issue.
Here's what worked for me.
You'll need to put this in a file somewhere (e.g. a types.d.ts file). Make sure to configure typeRoots in tsconfig.json to include the directory where you put the file
import{ThreeElements}from'@react-three/fiber'declare global {namespaceReact{namespaceJSX{interfaceIntrinsicElementsextendsThreeElements{}}}}
This fixed it for me. FWIW I'm using this library with preact with preact/compat and preact-reconciler
Hey all 👋
recently update to next 15/react 19 and since then I'm getting these errors for basic threejs elements like
ambientLight
,spotLight
and geometriesProperty 'ambientLight' does not exist on type 'JSX.IntrinsicElements'.ts(2339)
Anyone's got a fix or workaround for this?
The text was updated successfully, but these errors were encountered: