Ionic --prod build failed


#1

ionic cordova run android --prod with error

Error: The RegExp to find the DeepLinkConfigToken did not return valid data

it works fine without --prod

ionic info

cli packages: (/var/www/html/bh/node_modules)

    @ionic/cli-utils  : 1.9.2
    ionic (Ionic CLI) : 3.9.2

global packages:

    Cordova CLI : 6.5.0 

local packages:

    @ionic/app-scripts : 2.1.4
    Cordova Platforms  : android 6.2.3
    Ionic Framework    : ionic-angular 3.7.1

System:

    Node : v8.6.0
    npm  : 5.4.2 
    OS   : Linux 4.4

package.json

"dependencies": {
    "@angular/common": "4.4.3",
    "@angular/compiler": "4.4.3",
    "@angular/compiler-cli": "4.4.3",
    "@angular/core": "4.4.3",
    "@angular/forms": "4.4.3",
    "@angular/http": "4.4.3",
    "@angular/platform-browser": "4.4.3",
    "@angular/platform-browser-dynamic": "4.4.3",
    "@ionic-native/camera": "^3.14.0",
    "@ionic-native/core": "4.3.0",
    "@ionic-native/device": "^3.14.0",
    "@ionic-native/in-app-browser": "^3.14.0",
    "@ionic-native/network": "^3.14.0",
    "@ionic-native/onesignal": "^3.14.0",
    "@ionic-native/splash-screen": "4.3.0",
    "@ionic-native/status-bar": "4.3.0",
    "@ionic/storage": "^2.0.1",
    "@ngx-cache/core": "^0.4.0-beta.2",
    "@ngx-translate/core": "^6.0.1",
    "@ngx-translate/http-loader": "0.0.3",
    "@ngx-universal/translate-loader": "^0.4.0-beta.1",
    "crypto-js": "^3.1.9-1",
    "ionic-angular": "3.7.1",
    "ionic2-rating": "^1.2.2",
    "ionicons": "~3.0.0",
    "rxjs": "5.4.3",
    "sw-toolbox": "3.6.0",
    "zone.js": "0.8.18"
  },
  "devDependencies": {
    "@ionic/app-scripts": "^2.1.4",
    "ionic": "3.9.2",
    "typescript": "2.3.4"
  },

#2

All old and should be updated.


#3

Updating to latest all 3. fixed the issue. thanks