You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NodeJS 18 includes experiential support for the "fetch" api. This is causing sql.js not to work properly after Node v18. Because it checks if there is an global "fetch" funcion exists. If so it tries to fetch the wasm file.
Trying to serve a custom sql-wasm.wasm file for myself. Getting these errors suddenly 😬 At one point I did npm i and it said "changed 1 packaged" and then things started working again? But then when I reinstalled all my packages, on node version 18.8.0, it gave me this error. I've triple checked the url I'm passing in, and it is (correctly) http://localhost:8000/sql-wasm.wasm (with both slashes, not one). 🤷
EDIT: using sql.js version 1.7.0 fixed this for me. Also, staying with node version 18 rather than 16.
NodeJS 18 includes experiential support for the "fetch" api. This is causing sql.js not to work properly after Node v18. Because it checks if there is an global "fetch" funcion exists. If so it tries to fetch the wasm file.
sql-wasm.js
.... "function"!=typeof fetch?c(b):fetch(P,{credentials:"same-origin"}) .....
This check is invalid for NodeJS v18.
The text was updated successfully, but these errors were encountered: