While working on building an ionic project for production, everything runs smoothly in debug mode. However, when I try to serve it, no errors appear. But when attempting to build or run android, two different errors are thrown. Despite checking in IDEs like VS Code or Webstrom and not seeing any errors or imports after 'ionic-angular,' the following issues persist:
Error: Cannot find module “.”
A possible solution could be reducing the TypeScript version, but that is not feasible as the latest TypeScript version is required for RxJS 6.*, which cannot be downgraded either. Exhausted all other potential solutions found online.
The connection to the server was unsuccessful. (file ///android_asset/www/index.html)
Although this error is not a major concern at the moment.
Note: None of the similar titled questions on Stack Overflow have provided a resolution. Therefore, this is not a duplicate issue.