Could not find a declaration file for module '@babylonjs/havok'

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.”

The solution was to put:

optimizeDeps: {
  exclude: ['@babylonjs/havok'],
}

in my vite.config.ts

10 Likes