Uncaught TypeError: Cannot read properties of undefined (reading 'ARRAY_BUFFER')

Playground runs the main script: Babylon.js Playground (babylonjs.com)

So it seems a problem with the engine.

import {
  Engine,
  Scene,
  HemisphericLight,
  FreeCamera,
  MeshBuilder,
  Vector3,
} from '@babylonjs/core';

    const engine = new Engine(
      this.renderCanvas,
      true,
    );

Hello and welcome!

Could you please describe your problem in a more detailed way?
Otherwise it is almost impossible to help.

I run the code as per the sandbox and get the console error Uncaught TypeError: Cannot read properties of undefined (reading ‘ARRAY_BUFFER’)

at Engine.ThinEngine.bindArrayBuffer (thinEngine.ts:1553:42)
at Engine.ThinEngine._resetVertexBufferBinding (thinEngine.ts:1447:14)
at Engine.ThinEngine.wipeCaches (thinEngine.ts:2740:14)
at Engine.ThinEngine.restoreDefaultFramebuffer (thinEngine.ts:1440:14)
at Scene._bindFrameBuffer (scene.ts:3688:30)
at Scene.render (scene.ts:4065:18)

What browser and os are you using?

From my guessings there is probably something incorrect with your import.
You may try to check it as
import * as BABYLON from '@babylonjs/core'
and then use as
const engine = new BABYLON.Engine etc

If it works, it means that your previous import was not full.
If it doesn’t work, there could be other errors.

As I already mentioned, without detailed information from you it is hard to guess where the error is.

Canvas was being passed to engine before it was constructed.
(engine is omitted from docs so I had lazily put it at start of function)

So I hope the problem is solved?

1 Like