Getting dependency error even after installing all required node modules #3588
Replies: 2 comments
-
|
@priyalkhatri this is a TypeScript type augmentation issue. R3F's three.js JSX types need to be registered in the global JSX namespace. create a type declaration file (e.g. for React 19+ / Next.js 15+: import type { ThreeElements } from '@react-three/fiber';
declare module 'react' {
namespace JSX {
interface IntrinsicElements extends ThreeElements {}
}
}for React 18 and below: import type { ThreeElements } from '@react-three/fiber';
declare global {
namespace JSX {
interface IntrinsicElements extends ThreeElements {}
}
}make sure the this is documented in the R3F TypeScript guide. |
Beta Was this translation helpful? Give feedback.
-
|
Yes, After research I found this solution back then. Thank you so much for taking time to respond |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am using react-three-next library from pmndrs : https://github.com/pmndrs/react-three-next
I have done npm i after cloning the repository but still getting dependency error in threejs components for example like this in every threejs components:
"Property 'mesh' does not exist on type 'JSX.IntrinsicElements'"
I deleted node_modules and installed again still getting same error.
Anyone who have used this repo can help me with this?
@RenaudRohlinger , Your help will be appreciated!
Beta Was this translation helpful? Give feedback.
All reactions