Я обновил свой проект ionic 4 для использования angular 7, все работает в режиме отладки, но когда я пытаюсь скомпилировать для производства:
'ionic cordova build android --prod', я получаю следующий вывод:
ionic-app-scripts build --prod --target cordova --platform android
[20:24:15] ionic-app-scripts 3.2.4
...
[20:24:44] ошибка при наборе текста
Не удается найти файл определения типа для '@types'.
[20:24:44] Задача ionic-app-script: "сборка"
[20:24:44] Ошибка: не удалось передать TypeScript
Ошибка: не удалось передать TypeScript
at errorCheckProgram (/Users/jesusotero/Projects/Bambuco/confiar/mardeconfianza/app/node_modules/@ionic/app-scripts/dist/aot/aot-compiler.js:119:39)
на объекте. (/Users/jesusotero/Projects/Bambuco/confiar/mardeconfianza/app/node_modules/@ionic/app-scripts/dist/aot/aot-compiler.js:89:21)
на этапе (/Users/jesusotero/Projects/Bambuco/confiar/mardeconfianza/app/node_modules/@ionic/app-scripts/dist/aot/aot-compiler.js:32:23)
в Object.next (/Users/jesusotero/Projects/Bambuco/confiar/mardeconfianza/app/node_modules/@ionic/app-scripts/dist/aot/aot-compiler.js:13:53)
на выполненном (/Users/jesusotero/Projects/Bambuco/confiar/mardeconfianza/app/node_modules/@ionic/app-scripts/dist/aot/aot-compiler.js:4:58)
[ОШИБКА] Произошла ошибка при запуске подпроцесса ionic-app-scripts.
build-ion-app-scripts build --prod --target cordova --platform для Android завершен с кодом выхода 1.
Мне не удалось найти какого-либо решения этой проблемы, поэтому, если кто-то там может указать мне правильное направление решения этой проблемы, я действительно ценю это.
Мой package.json:
{
"name": "xxxxxxx",
"version": "1.0.2",
"author": "xxxxxx",
"homepage": "xxxxx",
"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/animations": "7.2.15",
"@angular/cli": "^7.3.9",
"@angular/common": "7.2.15",
"@angular/compiler": "7.2.15",
"@angular/compiler-cli": "7.2.15",
"@angular/core": "7.2.15",
"@angular/forms": "7.2.15",
"@angular/http": "7.2.15",
"@angular/platform-browser": "7.2.15",
"@angular/platform-browser-dynamic": "7.2.15",
"@ionic-native/android-full-screen": "^5.6.0",
"@ionic-native/core": "^5.6.0",
"@ionic-native/mobile-accessibility": "^5.6.0",
"@ionic-native/splash-screen": "^5.6.0",
"@ionic-native/status-bar": "^5.6.0",
"@ionic/pro": "1.0.20",
"@ionic/storage": "2.1.3",
"@ngx-translate/core": "^9.1.1",
"@ngx-translate/http-loader": "^2.0.1",
"cordova-android": "~7.0.0",
"cordova-ios": "4.5.5",
"cordova-plugin-device": "^2.0.2",
"cordova-plugin-fullscreen": "^1.2.0",
"cordova-plugin-ionic-keyboard": "^2.0.5",
"cordova-plugin-ionic-webview": "^2.3.1",
"cordova-plugin-network-information": "git+https://github.com/apache/cordova-plugin-network-information.git",
"cordova-plugin-splashscreen": "^5.0.2",
"cordova-plugin-statusbar": "^2.4.2",
"cordova-plugin-whitelist": "^1.3.3",
"ionic-angular": "^3.9.6",
"ionicons": "3.0.0",
"phonegap-plugin-mobile-accessibility": "^1.0.5",
"rxjs": "6.5.2",
"rxjs-compat": "^6.0.0-rc.0",
"sw-toolbox": "3.6.0",
"zone.js": "0.8.29"
},
"devDependencies": {
"@ionic/app-scripts": "^3.2.4",
"@types/node": "^12.0.2",
"typescript": "^3.2.4"
},
"description": "An Ionic project",
"cordova": {
"plugins": {
"cordova-plugin-whitelist": {},
"cordova-plugin-device": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-ionic-keyboard": {},
"cordova-plugin-fullscreen": {},
"phonegap-plugin-mobile-accessibility": {},
"cordova-plugin-ionic-webview": {
"ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+"
},
"cordova-plugin-statusbar": {}
},
"platforms": [
"android",
"ios"
]
}
}
Ионная информация:
Ionic:
ionic (Ionic CLI) : 4.12.0 (/usr/local/lib/node_modules/ionic)
Ionic Framework : ionic-angular 3.9.6
@ionic/app-scripts : 3.2.4
Cordova:
cordova (Cordova CLI) : 8.0.0
Cordova Platforms : android 7.0.0, ios 4.5.5
Cordova Plugins : cordova-plugin-ionic-keyboard 2.0.5, cordova-plugin-ionic-webview 2.3.1, (and 7 other plugins)
System:
NodeJS : v10.11.0 (/usr/local/Cellar/node/10.11.0/bin/node)
npm : 6.9.0
OS : macOS Mojave
Xcode : Xcode 10.2.1 Build version 10E1001