Hello, I’m trying to install Babylonjs-gui on my typescript project but I’m getting errors and I’m not able to build my project. Babylonjs-gui is added to the package.json and package-lock.json but still getting these errors (img) while building the project.
want to share a bit more about the way you build and what you use? what other packages are added, what package system are you using (if any?)
I’m using webpack to run my project locally and I’m not using any other packages.
I uninstalled the Babylonjs-gui and installed it again and now I’m getting these errors.
I followed the instructions on this page (https://www.npmjs.com/package/babylonjs-gui) to install the gui module for typescript project.
It seems like you are mixing the es6 modules (@babylonjs packages) and the UMD packages (babylonjs- packages). If it is a new project, I would recommend using only the es6 - ES6 - Babylon.js Documentation , which will make your codebase easier to maintain.
Thank you, It’s working now. I installed this @babylonjs/gui - npm.
You can not mix and match different “flavors” of the lib. either you rely on:
“babylonjs” with “babylonjs-materials” and “babylonjs-gui”
or you use the es6 version:
“@babylonjs/core” with “@babylonjs/materials” and “@babylonjs/gui”
You should not try to use both at once and they should also all use the same version.