Hi guys, I’m fairly new to the Babylon world. I’m having some issues with building my project. I’m using Vite Js and when I try to build it gives me the following error :
node_modules/@babylonjs/inspector/dist/babylon.inspector.module.d.ts:316:28 - error TS2307: Cannot find module ‘@babylonjs/shared-ui-components/tabs/propertyGrids/lockObject’ or its corresponding type declarations.
316 import { LockObject } from “@babylonjs/shared-ui-components/tabs/propertyGrids/lockObject”;
How are you importing Babylon? And more specifically, how are you importing inspector?If you are trying to import individual modules (for tree shaking), then importing inspector can be difficult. I usually just import the legacy module whenever I want to use inspector (negating any tree shaking).
Here’s example showing 5.0.3 does work with vite, but again, how you import things is important and there are multiple options.
I can confirm that a fix will be arriving shortly.
This is a typing issue only, as the classes are included in the bundle. My project build didn’t trigger this, but I can confirm the missing package. It should build correctly, but should of course be fixed.