Mime Type error when setting up Draco Wasm module

I’m trying to load a draco compressed GLB file. I’m using the 'DRACO GLB" example (from githug) as an example.

But when I do this:

pc.WasmModule.setConfig("DracoDecoderModule", {
    glueUrl: "../javascript/lib/draco/draco.wasm.js",
    wasmUrl: "../javascript/lib/draco/draco.wasm.wasm",
    fallbackUrl: "../javascript/lib/draco/draco.js",
pc.WasmModule.getInstance("DracoDecoderModule", demo);

(note that I double checked that the files are present on the indicated locations)

I get this error:

Something wrong with Mime Type. I have no ideas what that means. I learned a lot last weeks, but this is new for me. And I could not find it out by googling yet.

How can I solve that?

MIME type is how the browser identifies the resource or file being served by the server. That error looks like your server isn’t configured to serve WASM files as a WASM.

See here: Self-hosting for beginners | Learn PlayCanvas

You will need to configure your server to serve that file with the correct MIME type

The error is given for the draco.wasm.js file. Which is a javascript file. And other javascript files are loaded just fine.

I’m using the ‘Live Server’ plugin for Visual Studio Code. I looked in the settings and googled for a solution how to configure this server for wasm file. But I can not find it.

Oh I see. I would double check the paths in which case and check if they are correct relative to the HTML file

I’m confused.
The paths are ok.
It does work when I use a phyton based server!
But I really would like to use the Live-server plugin.
Any idea why it does not accept the access, while other javascript files are read correctly?

Relative to HTML or relative to the javascript file with the code?

I’m completely confused now because it works now both with:

pc.WasmModule.setConfig("DracoDecoderModule", {
    glueUrl: "../javascript/lib/draco/draco.wasm.js",
    wasmUrl: "../javascript/lib/draco/draco.wasm.wasm",
    fallbackUrl: "../javascript/lib/draco/draco.js",


pc.WasmModule.setConfig("DracoDecoderModule", {
    glueUrl: "./javascript/lib/draco/draco.wasm.js",
    wasmUrl: "./javascript/lib/draco/draco.wasm.wasm",
    fallbackUrl: "./javascript/lib/draco/draco.js",

(note the single or double dots at the beginning of the paths)

How can that be possible?
Are the files cached? I closed both server and browser in between.

Possibly. You do a force refresh (Shift + Cmd + R) or open devtools and under the network tab, tick ‘Disable Cache’

Nope, looks like a Live Server plugin issue that you are using. You may want to reach out to the author