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 also tried a) hoisting the Canvas and wrapping the canvas contents that component and b)putting use client at the top of the page. But I got the same error no matter what.
Not certain if it's related, but in VSCode I'm getting this error:
'EffectComposer' cannot be used as a JSX component.
Its type 'MemoExoticComponent<ForwardRefExoticComponent<EffectComposerProps & RefAttributes<unknown>>>' is not a valid JSX element type.
Type 'MemoExoticComponent<ForwardRefExoticComponent<EffectComposerProps & RefAttributes<unknown>>>' is not assignable to type '(props: any, deprecatedLegacyContext?: any) => ReactNode'.
Type 'import("/Users/jelling/dev/rbt/rbt-nx/node_modules/.pnpm/@[email protected]/node_modules/@types/react/index").ReactNode' is not assignable to type 'React.ReactNode'.
Type 'ReactElement<any, string | JSXElementConstructor<any>>' is not assignable to type 'ReactNode'.
Property 'children' is missing in type 'ReactElement<any, string | JSXElementConstructor<any>>' but required in type 'ReactPortal'.ts(2786)
index.d.ts(378, 9): 'children' is declared here.
(alias) const EffectComposer: MemoExoticComponent<ForwardRefExoticComponent<EffectComposerProps & RefAttributes<unknown>>>
import EffectComposer
Any ideas? There are a few older closed issues related to Next.js so not surprised if that's the issue somehow.
The text was updated successfully, but these errors were encountered:
Your React installation is duplicated, including types, which breaks features like context. Try a clean install or bring this upstream if something regressed with Next and their internal copy of React (yes, they do this and it creates tons of headache here).
Using the example code inside of a
Next 14.1
app throws"R3F: Hooks can only be used within the Canvas component!"
My code:
I also tried a) hoisting the
Canvas
and wrapping the canvas contents that component and b)puttinguse client
at the top of the page. But I got the same error no matter what.Not certain if it's related, but in VSCode I'm getting this error:
Any ideas? There are a few older closed issues related to Next.js so not surprised if that's the issue somehow.
The text was updated successfully, but these errors were encountered: