sql-js / sql-js/sql.js

electron-webpack build

Aperta
#404 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

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

Descrizione

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

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.

Direzione di ricerca

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.

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

Valutazione

Stack tecnologico
electron, javascript, sqlite, wasm
Ambito
build-system, databases, desktop
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.