Home > Enterprise >  Import Error with @react-three/fiber / @react-three/drei
Import Error with @react-three/fiber / @react-three/drei

Time:12-26

I'm trying to use some components from @react-three/drei and it gives me a ton of import errors. No matter what I try to use from @react-three/drei, I get these errors. Example:

ERROR in ./node_modules/three-stdlib/loaders/EXRLoader.js 1703:52-62
export 'RGBEFormat' (imported as 'RGBEFormat') was not found in 'three'

Another example:

export 'RGBEEncoding' (imported as 'RGBEEncoding') was not found in 'three'

These are the project's dependencies:

    "@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"

I appreciate the help and thanks in advance!

CodePudding user response:

The Three.js migration guide says "RGBEEncoding and RGBEFormat have been removed". from 136.
Try using 135 instead.

  • Related