Open Jansora opened 2 years ago
i solve this error with doing this.
"sql.js": "1.5.0",
import initSqlJs from "sql.js";
...
useEffect( () => {
if( db == null) {
initSqlJs(
{
locateFile: file => `https://cdn.jansora.com/lib/sql.js/1.5.0/${file}`
}
)
.then(SQL => setDb(new SQL.Database()))
.catch(err => console.error(err) || Message.error("init sqlite failed"));
}
}, [db])
When i using
craco
replacecreact-react-app
built the react app.package.json
SqlJsDemo.jsx
when i run
cacro start
, i got this error.