RectAreaLightHelper does not working

Here is a part of my code

var rl = new THREE.RectAreaLight(0xffffff, 2, 500, 2300);
rl.position.set(500, 0, 500);
rl.lookAt(0, 0, 0);

var helper = new THREE.RectAreaLightHelper( rl );
rl.add( helper );

RectAreaLight is working well but helper is not. What I’m doing wrong?

RectAreaLightHelper is no part of the core anymore (since r112). Meaning you have to import the module from the examples directory like so (assuming you are using the npm package):

import { RectAreaLightHelper }  from `three/examples/jsm/helpers/RectAreaLightHelper.js`;

I already have added this module in my html like this
<script src=""></script>
but still not working

RectAreaLightHelper is a ES6 module. You can’t import it like global scripts.

I suggest you study ES6 modules a bit to better understand this issue. The following resource is a good starting point:

Thanks, I fixed it!

i does not need to use Es6, or import export module, but in need how do you solve it would you tell us

RectAreaLightHelper does only exists as a ES6 module. Notice that at the end of the year, there will be true for all example files.

If you need RectAreaLightHelper as a global script, you have to do the conversion by yourself.