isParent of undefined

There error is found when I am trying to add a collision in this code:

enemy1 = this.physics.add.group({ immovable: false });

    for (var i = 0; i < 20; i++)
    {
        enemy1.create(new Enemy(this, Phaser.Math.Between(-200, this.game.config.width), Phaser.Math.Between(-200, this.game.config.height))); 
        //this.physics.add.existing(b);
        //b.body.setImmovable(false);   
    }
    
    this.physics.add.collider(player, enemy1);