sql-wasm.js does not work on Electron-react-app
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 13.7k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
After I import the sql.js on my electron-react project, I got following error(Cannot set property 'exports' of undefined).
I have checked sql-wasm.js, found the issue.
the Process.versio.node is null on almost react app.
But my app has the correct version.
In this case, the error is caused on sql-wasm.js(row:92).
Currently I have customized the sql-wasm file to use sql.js and avoid this issue.
from
module = undefined
to
module = {
exports: {}
}
so this does work current, but I need the perfect sql.js library.
Please, have a look and fix.
Thanks.
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 inspecting sql-wasm.js around row 92 and reproduce the reported import in an Electron React app, focusing on the null process.version.node case. Done means the library loads without the reported “Cannot set property 'exports' of undefined” error without requiring the described local workaround.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- electron, javascript, react, wasm
- Domain
- databases, desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100