Ionic cordova run android --prod throw error

I have a problem in ionic cordova build.
I run ionic cordova run android --prod to run my app.it throws error

Uncaught Error: Cannot find module "."
    at vendor.js:1
    at vendor.js:1
    at Object.<anonymous> (vendor.js:1)
    at e (vendor.js:1)
    at Object.239 (main.js:1)
    at e (vendor.js:1)
    at window.webpackJsonp (vendor.js:1)
    at main.js:1

After i run without --prod it works properly.

This is my ionic information .

1 Like

Hello,

maybe you have a typo in one of ngmodule.

Best regards, anna-liebt

The error you mentioned is a webpack error, it usually occurs from a typo somewhere like anna_liebt mentioned or commonly:

  1. Failing to properly place a module in app.module.ts (rare cause)
  2. An older module that is no longer viable (common)

You can try removing potentially troublesome modules and then running “npm i”

From your log output we do not have enough data to tell you specifically what the cause may be.

do you have any progress with this?
I’m facing the same