You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the EffectComposer component from drei, I'm encountering a "Cannot read properties of undefined (reading 'length')" error. This error occurs in the useLayoutEffect hook of the EffectComposer component. The current behavior is problematic because it prevents the EffectComposer from initializing properly and applying post-processing effects to the scene.
Actuall Behavior
The application throws the following error:
EffectComposer.tsx:141 Uncaught TypeError: Cannot read properties of undefined (reading 'length')
at EffectComposer.useLayoutEffect (EffectComposer.tsx:141:40)
Steps to Reproduce
Create a React Three Fiber scene
Add an EffectComposer component to the scene
Render the scene
Code Example
importReactfrom'react'import{Canvas}from'@react-three/fiber'import{EffectComposer}from'@react-three/postprocessing'functionScene(){return(<Canvas><mesh><boxGeometry/><meshStandardMaterial/></mesh><EffectComposer>{/* Your effects here */}</EffectComposer></Canvas>)}
The text was updated successfully, but these errors were encountered:
Mojtaba-amirii
changed the title
Title: 🐛 EffectComposer throws "Cannot read properties of undefined (reading 'length')" error
🐛 EffectComposer throws "Cannot read properties of undefined (reading 'length')" error
Jan 10, 2025
Environment
React
version: 19.0.0Next
version: 15.1.4three
version: 0.172.0@react-three/fiber
version: 9.0.0-rc.2@react-three/drei
version: 9.120.6node
version: v23.4.0npm
version: 10.9.2Problem description:
When using the EffectComposer component from drei, I'm encountering a "Cannot read properties of undefined (reading 'length')" error. This error occurs in the useLayoutEffect hook of the EffectComposer component. The current behavior is problematic because it prevents the EffectComposer from initializing properly and applying post-processing effects to the scene.
Actuall Behavior
The application throws the following error:
EffectComposer.tsx:141 Uncaught TypeError: Cannot read properties of undefined (reading 'length')
at EffectComposer.useLayoutEffect (EffectComposer.tsx:141:40)
Steps to Reproduce
Code Example
The text was updated successfully, but these errors were encountered: