@react-three/fiber / @react-three/drei 导入错误
2021-12-25
3039
我尝试使用来自 @react-three/drei 的一些组件,但它给我带来了大量导入错误。无论我尝试使用来自 @react-three/drei 的什么,我都会收到这些错误。 示例:
ERROR in ./node_modules/three-stdlib/loaders/EXRLoader.js 1703:52-62
export 'RGBEFormat' (imported as 'RGBEFormat') was not found in 'three'
另一个示例:
export 'RGBEEncoding' (imported as 'RGBEEncoding') was not found in 'three'
这些是项目的依赖项:
"@react-three/drei": "^8.3.1",
"@react-three/fiber": "^7.0.24",
"@testing-library/jest-dom": "^5.16.1",
"@testing-library/react": "^12.1.2",
"@testing-library/user-event": "^13.5.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-scripts": "5.0.0",
"three": "^0.136.0",
"three-stdlib": "^2.6.2",
"web-vitals": "^2.1.2"
感谢您的帮助,并提前致谢!
1个回答
Three.js 迁移指南
指出“RGBEEncoding 和 RGBEFormat 已被删除”。来自 136。
请尝试改用 135。
2pha
2021-12-25