Electron package related bug when load wasm file
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 13.7k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
The original code filename = nodePath'normalize'; is buggy when using it used with electron package.
fs.readFile will take this to a wrong path on electron packaged.
For exmaple:
I have a packaged file path "'file:///C:/**/resources/app/dist/demo.wasm", fs.readFile will throw a error like:
"Error: ENOENT: no such file or directory, open 'C::\C:\resources\app\dist\demo.wasm"
Actually it's a bug with emscripten, I have created a pull request for emscripten https://github.com/emscripten-core/emscripten/pull/18226)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the filename normalization shown in the issue and how fs.readFile handles file:/// paths in an Electron package. Review the linked Emscripten pull request to determine whether the fix belongs upstream or in sql.js. Done means the packaged demo.wasm path loads correctly without the reported ENOENT error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- electron, javascript, wasm
- Domain
- build-system, desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100