However when I try to show the debugLayer (uncomment line 3,4 and 7) I got this strange error :
Could not find module in path: '@babylonjs/core/tslib.es6.js'
–
Locally on VSCode error it is almost the same
Error: Build failed with 40 errors:
node_modules/@babylonjs/gui/2D/controls/checkbox.js:1:27: ERROR: Could not resolve "@babylonjs/core/tslib.es6.js"
node_modules/@babylonjs/gui/2D/controls/colorpicker.js:1:27: ERROR: Could not resolve "@babylonjs/core/tslib.es6.js"
node_modules/@babylonjs/gui/2D/controls/container.js:1:27: ERROR: Could not resolve "@babylonjs/core/tslib.es6.js"
node_modules/@babylonjs/gui/2D/controls/control.js:1:27: ERROR: Could not resolve "@babylonjs/core/tslib.es6.js"
node_modules/@babylonjs/gui/2D/controls/displayGrid.js:1:27: ERROR: Could not resolve "@babylonjs/core/tslib.es6.js"
...
Some components inside @babylon/gui try to
node_modules/@babylonjs/gui/2D/controls/colorpicker.js:1:27:
1 │ import { __decorate } from "@babylonjs/core/tslib.es6.js";
…and indeed the file does not exists in the @babylonjs/core package.
It’s also strange because when I browse the source code on github there’s no reference to this import {__decorate } in the typescript source :
I can figure it out why there’s no problem with other builders like webpack !
I don’t know why but npm i --save @babylonjs/core installed v5.21 by default, when I force to npm i --save @babylonjs/core@5.22 it works :). My bad I should have check this.