2

I am developing hybrid app in IONIC4. using typeorm for database. Geeting error

core.js:9110 ERROR Error: Uncaught (in promise): abort("abort(\"both async and sync fetching of the wasm failed\"). Build with -s ASSERTIONS=1 for more info."). Build with -s ASSERTIONS=1 for more info.
at resolvePromise (zone-evergreen.js:797)
at zone-evergreen.js:862
at ZoneDelegate.invokeTask (zone-evergreen.js:391)
at Object.onInvokeTask (core.js:34182)
at ZoneDelegate.invokeTask (zone-evergreen.js:390)
at Zone.runTask (zone-evergreen.js:168)
at drainMicroTaskQueue (zone-evergreen.js:559)

I have been searching so many in google. I have wasted my time. But does get any solution. Please suggest me.

Nitin Karale
  • 789
  • 3
  • 12
  • 34

2 Answers2

4

Put your compiled files (starfield.html, starfield.js, starfield.wasm) to the web server and run with the http. enter image description here

Dososkov
  • 51
  • 4
0

Same issue on Angular 12 and ionic 5, i think it may be caused by the webpack and sql.js. Here my custom.webpack.config.js:

const webpack = require('webpack');
console.log('The custom config is used');
module.exports = {
    plugins: [
        new webpack.ProvidePlugin({
            'window.SQL': 'sql.js/dist/sql-wasm.js'
        }),
        new webpack.NormalModuleReplacementPlugin(/typeorm$/, function (result) {
            result.request = result.request.replace(/typeorm/, "typeorm/browser");
        })
    ],
   
    resolve: {
        fallback: {
          fs: false,
          net: false,
          tls: false
        }
      }
};
Ilane
  • 1