I have installed the react three fiber
here's a dependences
"dependencies": {
"@react-three/drei": "^3.0.0",
"@testing-library/jest-dom": "^5.11.9",
"@testing-library/react": "^11.2.3",
"@testing-library/user-event": "^12.6.0",
"drei": "^2.2.21",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-scripts": "4.0.1",
"react-spring": "^8.0.27",
"react-three-fiber": "^5.3.18",
"three": "^0.125.1",
"web-vitals": "^0.2.4"
},
and I run npm i drei
after it, I tried to import useGLTF
import { useGLTF } from '@react-three/drei/useGLTF'
and I got error
./src/Components/Three/Scene.js
Module not found: Can't resolve '@react-three/drei/useGLTF' in 'D:coding
eactmincraftsrcComponentsThree'
I decided to check the file manually inside @react-three/drei/useGLTF
but there's no name such as useGLTF
do I need to run something else ?
question from:
https://stackoverflow.com/questions/65950660/importing-usegltf-from-react-three-drei-usegltf-cause-module-not-found 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…