# TypeError: Error: Cannot read property 'queueDepthSort' of undefined

**URL:** https://phaser.discourse.group/t/typeerror-error-cannot-read-property-queuedepthsort-of-undefined/7057
**Category:** Phaser 3
**Created:** [August 1, 2020, 9:20am UTC](https://phaser.discourse.group/t/typeerror-error-cannot-read-property-queuedepthsort-of-undefined/7057 "2020-08-01T09:20:16Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Marvin](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/marvin/32/3788_2.png) [@Marvin](https://phaser.discourse.group/u/Marvin)
#### Post date: [August 1, 2020, 9:20am UTC](https://phaser.discourse.group/t/typeerror-error-cannot-read-property-queuedepthsort-of-undefined/7057/1 "2020-08-01T09:20:16Z")

</div>

Hello, I am getting this error ‘TypeError: Cannot read property ‘queueDepthSort’ of undefined  
at Boss.GameObject’ when initialize my game.  
I do not know from where I can com. I add some code:  
Boss class:  
export default class Boss extends Entity {  
constructor(scene) {  
super(scene, 400, 80, “boss”, “Boss”);  
this.scene = scene;  
this.play(“boss”);  
this.lifes = 15;  
this.body.collideWorldBounds = true;  
}}  
Index.js:  
this.scene.add(‘Mission1’, new GameScene(‘Mission1’, ‘space’, ‘DialogueBoss1’, new Boss(‘Mission1’)));

GameScene:  
export default class GameScene extends Phaser.Scene {  
constructor(scene, key, bossText, boss) {  
super(scene);  
this.key = key;  
this.bossText = bossText;  
this.boss = boss;  
}}

I hope this helps to understands it and give me some feedback
