The Wayback Machine - https://web.archive.org/web/20210124105422/https://github.com/sql-js/sql.js/issues/404
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

electron-webpack build #404

Open
eightfivelabs opened this issue Jun 15, 2020 · 2 comments
Open

electron-webpack build #404

eightfivelabs opened this issue Jun 15, 2020 · 2 comments
Labels

Comments

@eightfivelabs
Copy link

@eightfivelabs eightfivelabs commented Jun 15, 2020

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

@lovasoa lovasoa added the question label Jun 15, 2020
@lovasoa
Copy link
Member

@lovasoa lovasoa commented Jun 15, 2020

Hello,
If you want a demo of how to use sql.js with webpack, have a look at https://github.com/sql-js/react-sqljs-demo

@eightfivelabs
Copy link
Author

@eightfivelabs eightfivelabs commented Jun 17, 2020

Hello,
If you want a demo of how to use sql.js with webpack, have a look at https://github.com/sql-js/react-sqljs-demo

Thanks @lovasoa, but unfortunately hasn't helped in my situation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants