ERROR export 'RGBEFormat' (imported as 'RGBEFormat') was not found in 'three'

Hi everyone,
This is my first time using three.js as I’m following a tutorial from 2020.
I’m using React and it gives me a bunch of errors saying:

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

I understand that I installed Three.js version 136 and RGBEFormat & RGBEEncoding have been removed from 136.

I followed this answer from Stackoverflow: reactjs - Import Error with @react-three/fiber / @react-three/drei - Stack Overflow
→ Changed "three": "^0.136.0" in my React package.json to "^0.135.0" but it didn’t solve the error.

I’m I doing this right?
Please help me fix this, thank you guys so much! :slight_smile:

It sounds like you may be using a mix of code from different three.js versions. All components will need to be in sync. If you’re using three-stdlib, for example, you’d need a version that includes this update: fix: remove depreciated encodings with r136 by CodyJasonBennett · Pull Request #108 · pmndrs/three-stdlib · GitHub

Maybe my code somehow outdated locally :sweat_smile:
I transferred all my code to another create-react-app project and there’s no more error.

1 Like