sql-js / sql-js/sql.js

electron-webpack build

Offen
#404 3 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

question
Vorherrschende Sprache
JavaScript
Sterne
13.7k
Forks
1.1k
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Hi there,

I am using electron-webpack to pack sql.js into an electron app, but getting the below errors.
The first error appears to have an issue with the sql-wasm.wasm file.

Uncaught SyntaxError: Invalid or unexpected token

The second error is because electron-webpack seems to want to still load the sql-wasm.wasm file from node_modules despite being copied over to js/sql-wasm.wasm output already.

/home/stuart/dev/ele…ist/sql-wasm.js:167 GET http://localhost:9080/home/stuart/dev/electron-svelte-typeorm-typescript/node_modules/sql.js/dist/sql-wasm.wasm 404 (Not Found)

/home/stuart/dev/ele…ist/sql-wasm.js:167 wasm streaming compile failed: TypeError: Failed to execute 'compile' on 'WebAssembly': HTTP status code is not ok

/home/stuart/dev/ele…ist/sql-wasm.js:167 falling back to ArrayBuffer instantiation

GET http://localhost:9080/home/stuart/dev/electron-svelte-typeorm-typescript/node_modules/sql.js/dist/sql-wasm.wasm 404 (Not Found)

Any thoughts would be appreciated. The sample repo is at https://github.com/eightfivelabs/electron-svelte-typeorm-typescript

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Start by reproducing the sample repository linked in the issue and inspect sql-wasm.js alongside the sql-wasm.wasm asset. Trace why the generated application requests the file from node_modules and why the initial wasm load produces a syntax error; done means the Electron build loads sql.js without either reported error.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
electron, javascript, sqlite, wasm
Bereich
build-system, databases, desktop
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
25/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.