При попытке запустить ionic serve --devapp
у меня появляется эта ошибка:
[ng] Cannot destructure property 'styles' of 'undefined' or 'null'.
[ng] TypeError: Cannot destructure property `styles` of 'undefined' or 'null'.
[ng] at Object.getCommonConfig (.\node_modules\@angular-devkit\build-angular\src\angular-cli-files\models\webpack-configs\common.js:33:107)
Я попытался очистить кэш npm, обновить все зависимости, удалить package-lock.json и установить снова. Несколько раз. Пробовал и нпм ци тоже.
Кажется, ничего не работает.
Вот мой package.json:
{
"name": "myludopal",
"version": "1.0.0",
"author": "Mazus DEV",
"homepage": "http://ionicframework.com/",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/animations": "^7.2.11",
"@angular/common": "^7.2.11",
"@angular/core": "^7.2.11",
"@angular/forms": "^7.2.11",
"@angular/http": "^7.2.11",
"@angular/platform-browser": "^7.2.11",
"@angular/platform-browser-dynamic": "^7.2.11",
"@angular/router": "^7.2.11",
"@ionic-native/barcode-scanner": "^5.3.0",
"@ionic-native/core": "^5.3.0",
"@ionic-native/file": "^5.3.0",
"@ionic-native/ionic-webview": "5.3.0",
"@ionic-native/splash-screen": "^5.3.0",
"@ionic-native/status-bar": "^5.3.0",
"@ionic/angular": "^4.1.2",
"@ionic/storage": "^2.2.0",
"android-versions": "^1.4.0",
"angular4-knob": "^1.1.11",
"chart.js": "^2.8.0",
"cordova": "^9.0.0",
"cordova-android": "^8.0.0",
"cordova-browser": "^6.0.0",
"cordova-plugin-device": "^2.0.2",
"cordova-plugin-file": "^6.0.1",
"cordova-plugin-file-transfer": "^1.7.1",
"cordova-plugin-ionic": "^5.3.0",
"cordova-plugin-ionic-keyboard": "^2.1.3",
"cordova-plugin-ionic-webview": "^4.0.1",
"cordova-plugin-splashscreen": "^5.0.2",
"cordova-plugin-statusbar": "^2.4.2",
"cordova-plugin-whitelist": "^1.3.3",
"core-js": "^3.0.0",
"ionic-image-loader": "^7.0.0-beta.2",
"lodash-es": "^4.17.11",
"ngx-chips": "^2.0.0-beta.0",
"phonegap-plugin-barcodescanner": "^8.0.1",
"rxjs": "^6.4.0",
"zone.js": "0.8.29"
},
"devDependencies": {
"@angular-devkit/architect": "^0.13.7",
"@angular-devkit/build-angular": "^0.13.7",
"@angular-devkit/core": "^7.3.7",
"@angular-devkit/schematics": "^7.3.7",
"@angular/cli": "^7.3.7",
"@angular/compiler": "^7.2.11",
"@angular/compiler-cli": "^7.2.11",
"@angular/language-service": "^7.2.11",
"@ionic/angular-toolkit": "^1.5.0",
"@types/jasmine": "^3.3.12",
"@types/jasminewd2": "^2.0.6",
"@types/lodash-es": "^4.17.3",
"@types/node": "^11.13.0",
"codelyzer": "^5.0.0",
"jasmine-core": "^3.3.0",
"jasmine-spec-reporter": "^4.2.1",
"karma": "^4.0.1",
"karma-chrome-launcher": "^2.2.0",
"karma-coverage-istanbul-reporter": "^2.0.5",
"karma-jasmine": "^2.0.1",
"karma-jasmine-html-reporter": "^1.4.0",
"protractor": "^5.4.2",
"ts-node": "^8.0.3",
"tslint": "^5.15.0",
"typescript": "3.2.4"
},
"description": "An Ionic project",
"cordova": {
"plugins": {
"cordova-plugin-whitelist": {},
"cordova-plugin-statusbar": {},
"cordova-plugin-device": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-ionic-webview": {
"ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+"
},
"cordova-plugin-ionic-keyboard": {},
"phonegap-plugin-barcodescanner": {
"ANDROID_SUPPORT_V4_VERSION": "27.+"
},
"cordova-plugin-file": {}
},
"platforms": [
"browser",
"android"
]
}
}
Не могу найти что-то конкретное для этого в Интернете, глядя на ошибку, кажется, что файл конфигурации пропускает атрибут 'style', я попытался пройти по цепочке вызовов и найти файл, который это был, но не смог не делай этого.
Другие команды сборки workd: ng serve
, ng build
, даже ionic cordova build android
работает ...
Команда, которую я пытаюсь запустить, используется для тестирования приложений Ionic в приложении devapp для Android.
Спасибо за любую идею.