Could not find a declaration file for module '@babylonjs/havok'. '/Users/aborade/projects/javascript/babylon/bjs-parkover/node_modules/@babylonjs/havok/lib/esm/HavokPhysics_es.js' implicitly has an 'any' type.
There are types at '/Users/aborade/projects/javascript/babylon/bjs-parkover/node_modules/@babylonjs/havok/HavokPhysics.d.ts', but this result could not be resolved when respecting package.json "exports". The '@babylonjs/havok' library may need to update its package.json or typings.
Regarding vite-config, just in case it helps anybody: I got an error when initializing the havok plugin in my project: “Uncaught (in promise) RuntimeError: Aborted(both async and sync fetching of the wasm failed). Build with -sASSERTIONS for more info.”
Also, to make sure it works properly when you install packages (npm install will occasionally redelete the wasm file)…add a “postinstall” script in package.json.
“postinstall”: “cp ./node_modules/@babylonjs/havok/lib/esm/HavokPhysics.wasm ./node_modules/.vite/deps”
I “thought” I had it fixed, then did production build/deploy and realized I needed this. Hours of “huh, what the heck is going on here?” Probably a newbie/obvious thing, but as a newbie…was super confusing.