@react-three/fiber / @react-three/drei 导入错误

Import Error with @react-three/fiber / @react-three/drei

我正在尝试使用来自@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"

感谢您的帮助并提前致谢!

Three.js migration guide 表示“RGBEEncoding 和 RGBEFormat 已被删除”。来自 136.
请尝试改用 135。