# Error when importing GlowLayer into project

**URL:** <https://forum.babylonjs.com/t/error-when-importing-glowlayer-into-project/24868>\
**Category:** Questions\
**Created:** [October 28, 2021, 7:55am UTC](https://forum.babylonjs.com/t/error-when-importing-glowlayer-into-project/24868 "2021-10-28T07:55:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![nate](https://avatars.discourse-cdn.com/v4/letter/n/e95f7d/32.png) [@nate](https://forum.babylonjs.com/u/nate)\
**Post date:** [October 28, 2021, 7:55am UTC](https://forum.babylonjs.com/t/error-when-importing-glowlayer-into-project/24868/1 "2021-10-28T07:55:34Z")

</div>

I am having some issues importing GlowLayer into my project. Everything works fine on a playground subdivision of my code. It glows as intended. However, when I try importing the GlowLayer into my entire project (offline, not playground), I get the following error:

> effectLayer.js?b602:215 Uncaught TypeError: this.\_scene.getBoundingBoxRenderer is not a function  
> at GlowLayer.EffectLayer.\_createMainTexture (effectLayer.js?b602:215)  
> at GlowLayer.EffectLayer.\_init (effectLayer.js?b602:122)  
> at new GlowLayer (glowLayer.js?33c1:50)

I am importing GlowLayer and using it like this:

> import {GlowLayer} from “@babylonjs/core/Layers”;  
> […]  
> var glow = new GlowLayer(“glow”, scene);

Anyone have any idea what I am missing here?

---

<div class="post-metadata">

**Author:** ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)\
**Post date:** [October 28, 2021, 12:20pm UTC](https://forum.babylonjs.com/t/error-when-importing-glowlayer-into-project/24868/2 "2021-10-28T12:20:18Z")

</div>

make sure to add:

```auto
import "@babylonjs/core/Rendering/boundingBoxRenderer";

```

to get the function assigned correctly.

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [October 28, 2021, 5:07pm UTC](https://forum.babylonjs.com/t/error-when-importing-glowlayer-into-project/24868/3 "2021-10-28T17:07:29Z")

</div>

Weird it should not be mandatory to import by default

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/7/6/76332ce5bb97dd791b12ac59cdc57d00544db63c.png)

Are you using our latest preview ?

---

<div class="post-metadata">

**Author:** ![nate](https://avatars.discourse-cdn.com/v4/letter/n/e95f7d/32.png) [@nate](https://forum.babylonjs.com/u/nate)\
**Post date:** [October 29, 2021, 3:58am UTC](https://forum.babylonjs.com/t/error-when-importing-glowlayer-into-project/24868/4 "2021-10-29T03:58:14Z")

</div>

Thanks, RaananW, that fixed it.

Sebavan, I am using Babylon version 4.2.

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [October 29, 2021, 9:26am UTC](https://forum.babylonjs.com/t/error-when-importing-glowlayer-into-project/24868/5 "2021-10-29T09:26:43Z")

</div>

Makes sense as the fix to not require it is only in 5.0 preview.
