Build: Cannot Fetch WASM
See original GitHub issueDescribe the bug
Using electron-serve
to serve a wasm file located in a “pkg” subdirectory in project root is fine. However, when running the build executable after using electron:build
, the following error is thrown: bootstrap:197 Fetch API cannot load app://./0af963a93f623d39583f.module.wasm. URL scheme "app" is not supported.
To Reproduce Presumably, import a wasm file into a Vue component and use the plugin to build it.
Expected behavior Expected to run correctly like with the electron:serve command
Environment (please complete the following information):
- OS and version: MacOS Catalina
- node version: v12.6.0
- npm version: 6.13.4
- yarn version (if used): 1.21.1
- vue-cli-plugin-electron-builder version : 1.4.4
- electron version: 6.1.7
Additional context Using Rust and wasm-pack to generate wasm files and the js glue files that gets imported by the Vue code.
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (3 by maintainers)
Top Results From Across the Web
failed to load wasm application - Stack Overflow
'The server responded with a non-Javascript MIME type of appliaction/WASM'. This error makes no sense to me.
Read more >Loading and running WebAssembly code - MDN Web Docs
This article provides a reference for the different mechanisms that can be used to fetch WebAssembly bytecode, as well as how to ...
Read more >Loading WebAssembly modules efficiently - web.dev
When working with WebAssembly, you often want to download a module, compile it, ... const response = await fetch('fibonacci.wasm');
Read more >Fetch API — Emscripten 3.1.26-git (dev) documentation
What is “No WebAssembly support found. Build with -sWASM=0 to target JavaScript instead” or “no native wasm support detected”? Why do I get...
Read more >WASM Tutorial - Marco Selvatici
Fetch the latest registry of available tools. ./emsdk update # Download and ... Once Emscripten is installed, we are ready to create our...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Awesome, that fixed the issue! Is there a reason why this isn’t the default functionality?
@vinceniko try @crossle’s suggestion, the code snippet to be modified is found in
src/background.js
.