Reputation: 3136
Using Babylon 4.2
import * as BABYLON from 'babylonjs';
var engine = new BABYLON.NullEngine();
var scene = new BABYLON.Scene(engine);
Yields
TypeError: BABYLON.NullEngine is not a constructor
In Babylon 4.2. However, the documentation uses this syntax : https://doc.babylonjs.com/typedoc/classes/babylon.nullengine
Upvotes: 1
Views: 766
Reputation: 31
Try changing
import * as BABYLON from 'babylonjs';
to
import BABYLON from 'babylonjs';
Worked for me, when writing with Node.js v16
Upvotes: 3