Trying out Babylon Editor for the first time, after creating my first project and waiting for "Installing dependencies..." to complete. The editor preview looks great but when I click "Play" the textures are missing. If I run npm start I can see the textures.
When I ran npn start it threw which I fixed, I'm including them below to help people searching:
const error = new UVException({
^
Error: UNKNOWN: unknown error, watch
at FSWatcher._handle.onchange (node:internal/fs/watchers:267:21)
Emitted 'error' event on FSWatcher instance at:
at FSWatcher._handleError (file:///E:/Development/babylon/node_modules/vite/dist/node/chunks/config.js:14117:148)
at NodeFsHandler$1._boundHandleError (file:///E:/Development/babylon/node_modules/vite/dist/node/chunks/config.js:13075:46)
at file:///E:/Development/babylon/node_modules/vite/dist/node/chunks/config.js:12959:4
at foreach (file:///E:/Development/babylon/node_modules/vite/dist/node/chunks/config.js:12893:8)
at fsWatchBroadcast (file:///E:/Development/babylon/node_modules/vite/dist/node/chunks/config.js:12958:3)
at FSWatcher.<anonymous> (file:///E:/Development/babylon/node_modules/vite/dist/node/chunks/config.js:12993:10)
at FSWatcher.emit (node:events:508:28)
at FSWatcher._handle.onchange (node:internal/fs/watchers:273:12) {
errno: -4094,
syscall: 'watch',
code: 'UNKNOWN',
filename: null
}
I fixed that by adding the following to vite.config:
import { defineConfig } from 'vite';
export default defineConfig({
server: {
watch: {
usePolling: true,
ignored: ['**/node_modules/**', '**/.git/**']
}
}
});
I run npm start again and get:
client:733 [vite] connecting...
client:827 [vite] connected.
logger.ts:107 BJS - [04:44:19]: Babylon.js v9.0.0 - WebGL2 - Parallel shader compilation
installHook.js:1 wasm streaming compile failed: TypeError: Failed to execute 'compile' on 'WebAssembly': Incorrect response MIME type. Expected 'application/wasm'.
overrideMethod @ installHook.js:1
installHook.js:1 falling back to ArrayBuffer instantiation
overrideMethod @ installHook.js:1
:5174/favicon.ico:1 Failed to load resource: the server responded with a status of 404 (Not Found)
installHook.js:1 failed to asynchronously prepare wasm: CompileError: WebAssembly.instantiate(): expected magic word 00 61 73 6d, found 3c 21 44 4f @+0
overrideMethod @ installHook.js:1
installHook.js:1 Aborted(CompileError: WebAssembly.instantiate(): expected magic word 00 61 73 6d, found 3c 21 44 4f @+0)
overrideMethod @ installHook.js:1
HavokPhysics_es.js:9 Uncaught (in promise) RuntimeError: Aborted(CompileError: WebAssembly.instantiate(): expected magic word 00 61 73 6d, found 3c 21 44 4f @+0). Build with -sASSERTIONS for more info.
at abort (HavokPhysics_es.js:9:6495)
at HavokPhysics_es.js:9:8366
I tell Claude Code to fix this and it makes some changes, mentions it had to tell Vite to not process HavokPhysics. And at this point I can view the project in my browser which successfully shows the textures, but the textures still don't show in the Babylon Editor.
Trying out Babylon Editor for the first time, after creating my first project and waiting for "Installing dependencies..." to complete. The editor preview looks great but when I click "Play" the textures are missing. If I run
npm startI can see the textures.When I ran
npn startit threw which I fixed, I'm including them below to help people searching:I fixed that by adding the following to vite.config:
I run
npm startagain and get:I tell Claude Code to fix this and it makes some changes, mentions it had to tell Vite to not process HavokPhysics. And at this point I can view the project in my browser which successfully shows the textures, but the textures still don't show in the Babylon Editor.