New problem with Typescript and babylonjs-gui

In my package.json, I have these dependencies - none of the @babylonjs dependencies.

"babylonjs": "^6.7.0",
"babylonjs-gui": "^6.7.0",
"babylonjs-loaders": "^6.7.0",
"babylonjs-materials": "^6.7.0",
"babylonjs-serializers": "^6.7.0",

In my tsconfig.json, I have these types:
“babylonjs”,
“babylonjs-gui”,
“babylonjs-loaders”,
“babylonjs-serializers”,

The BABYLON types import correctly in to a TS file with no explicit imports but I get an error in TS when including BABYLON.GUI. Please advise.

image

Thanks,
Michael

Do you have the same error if you add an import like ?

import "@babylonjs/gui/2D";

I’ll check that, thanks Michael! Probably some issue with generating the gui declaration file.
Will get back to you ASAP!

1 Like

Are you importing the babylonjs-gui package in your code? did it stop working, or is it a new project?

I can’t seem to reproduce this:

image