sql-wasm.js does not work on Electron-react-app

Aperta
#446 1 commento 2 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
electron, javascript, react, wasm
Ambito
databases, desktop

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
JavaScript
Stelle
13.7k
Fork
1.1k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di sql-js/sql.js

Tutte le issue di sql-js/sql.js

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.