问题描述
我尝试了alpha-scroll组件,然后它不起作用,因此我将其卸载了,但是从那时起,我一直试图构建自己的解决方案,因此它不起作用。我遇到以下错误,并尝试了一些修复方法,但没有运气。离子服务有效,但离子科尔多瓦无法运行android。我删除了node_modules文件夹并重新安装了npm,但仍然无法修复它。请帮忙!!!非常感谢!!!
错误:
ng.cmd run app:ionic-cordova-serve --host=localhost --port=8100 --platform=android
[ng] An unhandled exception occurred: Invalid options object. copy Plugin has been initialized using an options object that does not match the API schema.
[ng] - options[0] misses the property 'patterns'. Should be:
[ng] [non-empty string | object { from,to?,context?,globOptions?,toType?,force?,flatten?,transform?,cacheTransform?,transformPath?,noErrorOnMissing? },...] (should not have fewer than 1 item)
日志错误:
[error] ValidationError: Invalid options object. copy Plugin has been initialized using an options object that does not match the API schema.
- options[0] misses the property 'patterns'. Should be:
[non-empty string | object { from,...] (should not have fewer than 1 item)
at validate (C:\Users\vibalani\Documents\Mobile App Development\First Real App\My_First_Real_Menu_App\node_modules\schema-utils\dist\validate.js:96:11)
at new copyPlugin (C:\Users\vibalani\Documents\Mobile App Development\First Real App\My_First_Real_Menu_App\node_modules\copy-webpack-plugin\dist\index.js:24:30)
at Object.webpackConfiguration (C:\Users\vibalani\Documents\Mobile App Development\First Real App\My_First_Real_Menu_App\node_modules\@ionic\angular-toolkit\builders\cordova-serve\index.js:55:39)
at setup (C:\Users\vibalani\Documents\Mobile App Development\First Real App\My_First_Real_Menu_App\node_modules\@angular-devkit\build-angular\src\dev-server\index.js:115:46)
at processticksAndRejections (internal/process/task_queues.js:97:5)
Package.json:
{
"name": "My_First_Real_Menu_App","version": "0.0.1","author": "Ionic Framework","homepage": "https://ionicframework.com/","scripts": {
"ng": "ng","start": "ng serve","build": "ng build","test": "ng test","lint": "ng lint","e2e": "ng e2e"
},"private": true,"dependencies": {
"@angular/common": "~9.1.6","@angular/core": "~9.1.6","@angular/forms": "~9.1.6","@angular/platform-browser": "~9.1.6","@angular/platform-browser-dynamic": "~9.1.6","@angular/router": "~9.1.6","@ionic-native/core": "^5.0.7","@ionic-native/splash-screen": "^5.0.0","@ionic-native/sqlite": "^5.27.0","@ionic-native/sqlite-porter": "^5.27.0","@ionic-native/status-bar": "^5.0.0","@ionic/angular": "^5.0.0","@ionic/storage": "^2.3.0","compare-func": "^2.0.0","cordova-android": "^9.0.0","cordova-browser": "^6.0.0","cordova-sqlite-storage": "^5.0.1","cordova-windows": "^7.0.1","gradle": "^1.2.3","ionic-numberpicker": "^1.1.4","rxjs": "~6.5.1","schema-utils": "^2.7.0","tslib": "^1.10.0","uk.co.workingedge.cordova.plugin.sqliteporter": "^1.1.1","zone.js": "~0.10.2"
},"devDependencies": {
"@angular-devkit/build-angular": "~0.901.5","@angular/cli": "~9.1.5","@angular/compiler": "~9.1.6","@angular/compiler-cli": "~9.1.6","@angular/language-service": "~9.1.6","@ionic/angular-toolkit": "^2.3.1","@types/jasmine": "~3.5.0","@types/jasminewd2": "~2.0.3","@types/node": "^12.11.1","clean-webpack-plugin": "^3.0.0","codelyzer": "^5.1.2","copy-webpack-plugin": "^6.0.3","cordova-plugin-device": "^2.0.2","cordova-plugin-ionic-keyboard": "^2.2.0","cordova-plugin-ionic-webview": "^4.2.1","cordova-plugin-splashscreen": "^5.0.2","cordova-plugin-statusbar": "^2.4.2","cordova-plugin-whitelist": "^1.3.3","jasmine-core": "~3.5.0","jasmine-spec-reporter": "~4.2.1","karma": "~5.0.0","karma-chrome-launcher": "~3.1.0","karma-coverage-istanbul-reporter": "~2.1.0","karma-jasmine": "~3.0.1","karma-jasmine-html-reporter": "^1.4.2","mini-css-extract-plugin": "^0.10.0","protractor": "^7.0.0","ts-node": "~8.3.0","tslint": "~6.1.0","typescript": "~3.8.3","webpack": "^4.44.1"
},"description": "An Ionic project","cordova": {
"plugins": {
"cordova-plugin-whitelist": {},"cordova-plugin-statusbar": {},"cordova-plugin-device": {},"cordova-plugin-splashscreen": {},"cordova-plugin-ionic-webview": {},"cordova-plugin-ionic-keyboard": {},"cordova-sqlite-storage": {},"uk.co.workingedge.cordova.plugin.sqliteporter": {}
},"platforms": [
"android"
]
}
}
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)