Open AbanoubNassem opened 6 years ago
When built with --prod , I got this error :
vendor.js:1 Uncaught TypeError: P.a.defineLocale is not a function vendor.js:1 Ionic Native: deviceready event fired after 371 ms
I can't track it back , since it's minified and uglified , my code has no such a functions defineLocale
defineLocale
here is some is ionic info:
cli packages: (C:\Users\Abanoub\AppData\Roaming\npm\node_modules) @ionic/cli-utils : 1.18.0 ionic (Ionic CLI) : 3.18.0 global packages: cordova (Cordova CLI) : 7.1.0 local packages: @ionic/app-scripts : 3.1.0 Cordova Platforms : android 6.3.0 Ionic Framework : ionic-angular 3.9.2 System: Android SDK Tools : 25.2.3 Node : v8.9.1 npm : 5.5.1 OS : Windows 7 Environment Variables: ANDROID_HOME : C:\Program Files (x86)\Android\android-sdk Misc: backend : legacy
and the package.json :
..... "dependencies": { "@angular/animations": "5.0.0", "@angular/common": "5.0.0", "@angular/compiler": "5.0.0", "@angular/compiler-cli": "5.0.0", "@angular/core": "5.0.0", "@angular/forms": "5.0.0", "@angular/http": "5.0.0", "@angular/platform-browser": "5.0.0", "@angular/platform-browser-dynamic": "5.0.0", "@ionic-native/camera": "4.4.0", "@ionic-native/core": "4.4.0", "@ionic-native/date-picker": "^4.4.0", "@ionic-native/deeplinks": "^4.4.0", "@ionic-native/device": "^4.4.0", "@ionic-native/dialogs": "^4.4.0", "@ionic-native/facebook": "4.4.0", "@ionic-native/file": "4.4.0", "@ionic-native/file-path": "^4.4.0", "@ionic-native/file-transfer": "4.4.0", "@ionic-native/geolocation": "^4.4.0", "@ionic-native/google-plus": "4.4.0", "@ionic-native/header-color": "4.4.0", "@ionic-native/http": "4.4.0", "@ionic-native/push": "^4.4.0", "@ionic-native/social-sharing": "^4.4.0", "@ionic-native/splash-screen": "4.4.0", "@ionic-native/status-bar": "4.4.0", "@ionic-native/transfer": "^3.14.0", "@ionic/storage": "^2.1.3", "@ngx-translate/core": "^8.0.0", "@ngx-translate/http-loader": "^0.1.0", "angular-draggable-droppable": "^1.1.0", "angular-resizable-element": "^1.2.3", "cordova-android": "~6.3.0", "cordova-ios": "^4.5.3", "cordova-plugin-camera": "^2.4.1", "cordova-plugin-compat": "^1.2.0", "cordova-plugin-console": "^1.1.0", "cordova-plugin-datepicker": "^0.9.3", "cordova-plugin-device": "^1.1.6", "cordova-plugin-facebook4": "^1.9.1", "cordova-plugin-file": "^4.3.0", "cordova-plugin-file-transfer": "^1.6.3", "cordova-plugin-filepath": "^1.1.0", "cordova-plugin-geolocation": "^2.4.3", "cordova-plugin-googleplus": "^5.1.1", "cordova-plugin-headercolor": "^1.0.0", "cordova-plugin-splashscreen": "^4.0.3", "cordova-plugin-statusbar": "^2.2.3", "cordova-plugin-whitelist": "^1.3.2", "cordova-plugin-x-socialsharing": "^5.2.1", "cordova-sqlite-storage": "^2.1.1", "es6-promise-plugin": "^4.1.0", "ionic-angular": "3.9.2", "ionic-image-loader": "^4.2.1", "ionic-plugin-deeplinks": "^1.0.15", "ionic-plugin-keyboard": "^2.2.1", "ionic2-rating": "^1.2.2", "ionicons": "3.0.0", "moment": "^2.19.1", "ng2-validation": "^4.2.0", "phonegap-plugin-push": "^2.1.0", "rxjs": "5.5.2", "sw-toolbox": "3.6.0", "zone.js": "0.8.18" }, "devDependencies": { "@ionic/app-scripts": "3.1.0", "typescript": "2.4.2" } .......
it only happens when built with --prod , if built without it , everything works fine!
Same here!
@AbanoubNassem @Temeteron Please post the full output of ionic build --prod. It's useful to debug.
ionic build --prod
When built with --prod , I got this error :
I can't track it back , since it's minified and uglified , my code has no such a functions
defineLocale
here is some is ionic info:
and the package.json :
it only happens when built with --prod , if built without it , everything works fine!