Property undefined

Hello I’m new in Phaser 3 and i fiddle with it’ s a plain example sketch
function create ()
{
this.matter.world.setBounds(0, 0, 800, 590, 32, true, true, false, true);

Here I get cannot read property world undefined
I use this in my index.html

The most scrips works
What I’m missing

Hello, probably you forget to add matter as the physics engine in the phaser 3 config. Here is an example config for enabling matter:

var config = {
    type: Phaser.AUTO,
    width: 800,
    height: 600,
    backgroundColor: '#1b1464',
    parent: 'phaser-example',
    physics: {
        default: 'matter',
        matter: {
        }
    },
    scene: {
        preload: preload,
        create: create
    }
};

Thx for answering but I have
var config = {
type: Phaser.AUTO,
width: 800,
height: 600,
backgroundColor: ‘#1d1d1d’,
parent: ‘container’,
physics: {
default: ‘matter’,
matter: {
enableSleeping: true

    }
},

I made the code more simple with the same result Phaser 3 does not know the Object matter.
If I do this with the complex index.html the example balls in physics it works. I also altered it to the latest Version 2.24.1

<!DOCTYPE html>
<html>
<head>
    <script src="https://cdn.jsdelivr.net/npm/phaser@3.24.1/dist/phaser-arcade-physics.min.js"></script>
</head>
<body>
    <script>

    var config = {
    type: Phaser.AUTO,
    width: 800,
    height: 600,
    backgroundColor: '#1d1d1d',
    parent: 'phaser-example',
    physics: {
        default: 'matter',
        matter: {
            enableSleeping: true
            
        }
    },
    scene: {
        preload: preload,
        create: create
    }
};

var game = new Phaser.Game(config);

function preload ()
{
    this.load.image('ball', 'assets/sprites/pangball.png');
}

function create ()
{
    this.matter.world.setBounds(0, 0, 800, 600, 32, true, true, false, true); // Here is the problem 

    //  Add in a stack of balls

    for (var i = 0; i < 64; i++)
    {
        var ball = this.matter.add.image(Phaser.Math.Between(100, 700), Phaser.Math.Between(-600, 0), 'ball');
        ball.setCircle();
        ball.setFriction(0.005);
        ball.setBounce(1);
    }
}
    </script>

</body>
</html>

I solved the Problem I don’t know why but
https://cdn.jsdelivr.net/npm/phaser@3.24.1/dist/phaser-arcade-physics.min.js
does not support the Object matter, I used my local Script

script src=“src/phaser.js”>
and it worked. Thy community

I see the problem. Phaser arcade physics version doesn’t contain matter physics, that’s why matter is undefined. You should use the whole library or a custom version with matter physics imported.