Через некоторое время, работая над моим проектом Ionic 3, что-то изменилось. Я гуглил и искал на форуме Ionic Framework, но без ответа проблема возникает часто.
Я надеюсь, что кто-то может помочь.
Когда я запускаю команду ionic build --prod
(или Ionic cordova build android --prod
), на определенном этапе она зависает и начинает потреблять неограниченную оперативную память.
Вот подробности:
Так что мне пришлось убить процесс, иначе он закончится кучей памяти.
Мой package.json
такой:
{
"name": "grocery",
"version": "1.3.0",
"author": "hussemsoft@gmail.com",
"homepage": "http://www.kunzo.sa/",
"private": true,
"config": {
"ionic_purge_unused_fonts": false
},
"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": "5.0.3",
"@angular/compiler": "5.0.3",
"@angular/compiler-cli": "5.0.3",
"@angular/core": "5.0.3",
"@angular/forms": "5.0.3",
"@angular/http": "5.0.3",
"@angular/platform-browser": "5.0.3",
"@angular/platform-browser-dynamic": "5.0.3",
"@ionic-native/call-number": "^4.7.0",
"@ionic-native/core": "4.4.0",
"@ionic-native/diagnostic": "^4.5.2",
"@ionic-native/firebase": "^4.5.3",
"@ionic-native/geolocation": "^4.5.2",
"@ionic-native/google-maps": "^4.5.2",
"@ionic-native/keyboard": "^4.5.2",
"@ionic-native/launch-navigator": "^4.7.0",
"@ionic-native/native-geocoder": "^4.5.2",
"@ionic-native/network": "^4.5.2",
"@ionic-native/screen-orientation": "^4.5.2",
"@ionic-native/splash-screen": "4.4.0",
"@ionic-native/status-bar": "^4.5.3",
"@ionic/app-scripts": "^3.1.10",
"@ionic/pro": "1.0.16",
"@ionic/storage": "^2.1.3",
"@ngx-translate/core": "^9.0.2",
"@ngx-translate/http-loader": "^2.0.1",
"angularfire2": "^5.0.0-rc.5-next",
"call-number": "^1.0.1",
"cordova-android": "6.3.0",
"cordova-plugin-actionsheet": "^2.3.3",
"cordova-plugin-device": "^1.1.7",
"cordova-plugin-dialogs": "^2.0.1",
"cordova-plugin-firebase": "^0.1.25",
"cordova-plugin-geolocation": "^3.0.0",
"cordova-plugin-googlemaps": "^2.3.6",
"cordova-plugin-ionic-webview": "^1.2.1",
"cordova-plugin-nativegeocoder": "^2.0.5",
"cordova-plugin-network-information": "^1.3.4",
"cordova-plugin-screen-orientation": "^2.0.2",
"cordova-plugin-splashscreen": "^4.1.0",
"cordova-plugin-statusbar": "^2.4.2",
"cordova-plugin-whitelist": "^1.3.3",
"cordova.plugins.diagnostic": "^3.9.2",
"es6-promise-plugin": "^4.2.2",
"firebase": "^4.10.0",
"imgcache.js": "^1.1.1",
"ionic-angular": "^3.9.2",
"ionic-plugin-keyboard": "^2.2.1",
"ionicons": "3.0.0",
"minimist": "^1.2.0",
"mx.ferreyra.callnumber": "0.0.2",
"promise-polyfill": "^6.1.0",
"rxjs": "5.5.2",
"sw-toolbox": "3.6.0",
"uk.co.workingedge.phonegap.plugin.launchnavigator": "^4.2.1",
"xml2js": "^0.4.19",
"zone.js": "0.8.18"
},
"devDependencies": {
"@angular/cli": "^1.7.0",
"typescript": "2.4.2",
"uglify-es": "3.2.2"
},
"description": "Dukan app",
"cordova": {
"plugins": {
"cordova-plugin-whitelist": {},
"cordova-plugin-device": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-ionic-webview": {},
"cordova-plugin-geolocation": {
"GEOLOCATION_USAGE_DESCRIPTION": "To locate you"
},
"cordova-plugin-nativegeocoder": {},
"cordova.plugins.diagnostic": {},
"cordova-plugin-network-information": {},
"cordova-plugin-firebase": {},
"cordova-plugin-statusbar": {},
"cordova-plugin-screen-orientation": {},
"ionic-plugin-keyboard": {},
"mx.ferreyra.callnumber": {},
"uk.co.workingedge.phonegap.plugin.launchnavigator": {
"OKHTTP_VERSION": "3.+"
},
"call-number": {}
},
"platforms": [
"android"
]
}
}
И ионная информация дает:
@ionic/cli-utils : 1.19.2
ionic (Ionic CLI) : 3.20.0
global packages:
cordova (Cordova CLI) : 8.0.0
local packages:
@ionic/app-scripts : 3.1.10
Cordova Platforms : none
Ionic Framework : ionic-angular 3.9.2
System:
Android SDK Tools : 26.1.1
Node : v6.14.2
npm : 5.10.0
OS : Windows 10
Environment Variables:
ANDROID_HOME : C:\Users\HUSSEM-PC\AppData\Local\Android\sdk
Misc:
backend : pro
Я совершенно уверен, что это имеет отношение к webpack
.