Hi Team,
Please help me to fix the below error when I try to build android app with --prod :
Uncaught ReferenceError: AppRootToken is not defined
at Function.t.forRoot (main.js:63)
at main.js:59
at Object.<anonymous> (main.js:59)
at e (main.js:1)
at Object.<anonymous> (main.js:50)
at e (main.js:1)
at Object.<anonymous> (main.js:74)
at e (main.js:1)
at main.js:1
at main.js:1
Here is my ionic info,
cli packages:
@ionic/cli-utils : 1.12.0
ionic (Ionic CLI) : 3.12.0
global packages:
cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)
local packages:
@ionic/app-scripts : 1.3.7
Cordova Platforms : android 6.2.0
Ionic Framework : ionic-angular 3.3.0
System:
Android SDK Tools : 26.1.1
Node : v6.17.0
npm : 3.10.10
OS : macOS High Sierra
Misc:
backend : pro
Here is my package.json:
{
"name": "Ionic",
"version": "0.0.1",
"author": "Ionic Framework",
"homepage": "http://ionicframework.com/",
"private": true,
"scripts": {
"clean": "ionic-app-scripts clean",
"build": "ionic-app-scripts build",
"lint": "ionic-app-scripts lint",
"ionic:build": "ionic-app-scripts build",
"ionic:serve": "ionic-app-scripts serve"
},
"dependencies": {
"@angular/common": "4.1.2",
"@angular/compiler": "4.1.2",
"@angular/compiler-cli": "4.1.2",
"@angular/core": "4.1.2",
"@angular/forms": "4.1.2",
"@angular/http": "4.1.2",
"@angular/platform-browser": "4.1.2",
"@angular/platform-browser-dynamic": "4.1.2",
"@ionic-native/app-version": "^3.10.2",
"@ionic-native/call-number": "^3.10.2",
"@ionic-native/camera": "^3.10.2",
"@ionic-native/contacts": "^3.10.2",
"@ionic-native/core": "3.10.2",
"@ionic-native/device": "^3.10.2",
"@ionic-native/diagnostic": "^3.10.2",
"@ionic-native/facebook": "^3.10.2",
"@ionic-native/geolocation": "^3.10.2",
"@ionic-native/google-analytics": "^3.10.2",
"@ionic-native/google-maps": "^3.10.2",
"@ionic-native/google-plus": "^3.10.2",
"@ionic-native/image-picker": "^3.10.2",
"@ionic-native/keyboard": "^3.10.2",
"@ionic-native/network": "^3.10.2",
"@ionic-native/push": "^3.10.2",
"@ionic-native/sms": "^3.10.2",
"@ionic-native/social-sharing": "^3.10.2",
"@ionic-native/spinner-dialog": "^3.10.2",
"@ionic-native/splash-screen": "3.10.2",
"@ionic-native/status-bar": "3.10.2",
"@ionic-native/toast": "^3.10.2",
"@ionic/cloud-angular": "^0.12.0",
"@ionic/storage": "2.0.1",
"angular2-moment": "^1.3.3",
"cordova-android": "^6.2.0",
"cordova-plugin-device": "^1.1.4",
"cordova-plugin-google-analytics": "^1.8.4",
"cordova-plugin-ionic-webview": "^1.2.1",
"cordova-plugin-splashscreen": "^4.0.3",
"cordova-plugin-whitelist": "^1.3.1",
"cordova-plugin-x-toast": "~2.7.2",
"hammerjs": "2.0.8",
"ionic-angular": "3.3.0",
"ionic-plugin-keyboard": "~2.2.1",
"ionicons": "3.0.0",
"q": "1.4.1",
"rxjs": "^5.1.1",
"socket.io-client": "^1.6.0",
"sw-toolbox": "3.6.0",
"zone.js": "0.8.18"
},
"devDependencies": {
"@ionic/app-scripts": "^1.3.7",
"@types/googlemaps": "3.26.0",
"typescript": "^2.9.2"
},
"description": "An Ionic project",
"config": {
"ionic_webpack": "./webpack.config.js"
},
"cordova": {
"plugins": {
"ionic-plugin-keyboard": {},
"cordova-plugin-whitelist": {},
"cordova-plugin-device": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-ionic-webview": {},
"cordova-plugin-x-toast": {},
"cordova-plugin-googlemaps": {
"API_KEY_FOR_ANDROID": "",
"API_KEY_FOR_IOS": ""
},
"cordova-plugin-console": {},
"cordova-plugin-statusbar": {},
"cordova-plugin-spinner-dialog": {},
"cordova-plugin-x-socialsharing": {},
"cordova-plugin-googleplus": {
"REVERSED_CLIENT_ID": ""
},
"cordova-plugin-camera": {},
"cordova-plugin-contacts": {},
"cordova-plugin-geolocation": {},
"cordova-plugin-network-information": {},
"es6-promise-plugin": {},
"cordova-plugin-telerik-imagepicker": {},
"cordova-plugin-facebook4": {
"APP_ID": "",
"APP_NAME": ""
},
"ionic-plugin-deploy": {},
"cordova-plugin-google-analytics": {
"GMS_VERSION": "11.0.1"
},
"phonegap-plugin-push": {
"SENDER_ID": ""
}
},
"platforms": [
"android"
]
}
}
P.S: I also have referred the following links but none helped me