Havok Error: Failed to construct 'URL': Invalid URL

@tecdip I ran into the same problem, that the HavokPhysics instantiation was failing becaues of invalid URL (for the WASM file). I ended-up manually copying the HavokPhysics.wasm file into my output folder and then point the HavokPhysics instance to it like:

const havokInstance = await HavokPhysics({
    locateFile: () => {
      return 'path/to/your/HavokPhysics.wasm'
    },
  })
  const havokPlugin = new HavokPlugin(true, havokInstance)
  scene.enablePhysics(gravity, havokPlugin)

I found this workaround here Unable to load Havok plugin (error while loading .wasm file from browser) - #45 by dap