Error in React Post processing

Hello all,
I try to implement a little Post Processing in my scene 3D but i has a bug, that i don’t know why. I just add an EffectComposer and it got an Error.
I try to go in the docs to, look how they use it, and i remarked that many many project, exemple using React three Postprocessing have this same bug.

Anyone know why?

Your error is not something I have ever seen.
I have quite a few R3F post processing examples and they are all working.

Maybe you’re mixing threejs versions in your imports, package.json or something else bad about your project setup.
Perhaps you are using React18 imports, but mixing with libs made for React19.
Are you using a build tool? Make sure you have the latest versions of all your libraries.

1 Like

Do you have an example of what produces the error? (from the docs)

I use React 19 and it doesn’t work., And this error is captured on this https://codesandbox.io/p/sandbox/reflectorplanes-and-bloom-dy0tkg

can you give me all your libs version

https://codesandbox.io/p/sandbox/reflectorplanes-and-bloom-dy0tkg

from this

your codesandbox example says its react 17. Use the latest version of all those libs. And also codesandbox does wierd things with libs in the background, you dont really know what its using when it comes to react.
try to build it locally using a build tool like vite.
My examples are all react18. you can see the versions in the source code when your press the <> button on all the working examples.

I will schedule updating the code to react19 at some time in the future.

I just rebuilt my bloom demo locally using these versions

"@react-three/drei": "^10.1.2",
"@react-three/fiber": "^9.1.2",
"@react-three/postprocessing": "^3.0.4",
"leva": "^0.10.0",
"react": "^19.1.0",
"react-dom": "^19.1.0",
"three": "^0.175.0"

I wasn’t able to use @react-three/postprocessing with three r176 or r177 since it references LuminanceFormat which was removed here pr #30934

And it doesn’t have any bugs?
Can you give me your code on your try please?

if you try this live demo by Introduction - React Postprocessing in https://codesandbox.io/p/sandbox/react-postprocessing-dof-blob-pqrpl?file=%2Fsrc%2FApp.js

You got the same error

i dont use codesandbox anymore. makes my computer sound like a rocket and takes forever to start, and i have to allow third party cookies. And they want to charge me if i host my examples on it. So i stay away from it and use my own system https://sbedit.net

git clone https://github.com/Sean-Bradley/React-Three-Fiber-Boilerplate.git
cd React-Three-Fiber-Boilerplate
git checkout bloom
npm install
npm start