Description
Description:
Creating a brand new angular based blank ionic 5 project gives an error when trying to run livereload:
Steps to Reproduce:
I create a brand new angular based starter - blank - Ionic 5 project via
ionic start test2
I then added the cordova android platform with the following command:
ionic cordova platform add android
I run the following command to do a livereload:
ionic cordova run android -l
Output:
ionic cordova run android -l
[INFO] Hardware device(s) found for android. Using --device.
> ng 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)
[ng] See "/private/var/folders/1k/dwr2csfs5lnfrs7xq7520v_w0000gq/T/ng-K8HjCr/angular-errors.log" for further details.
[ERROR] ng has unexpectedly closed (exit code 127).
The Ionic CLI will exit. Please check any output above for error details.
The error references another error log file. The contents are as follows:
[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, to?, context?, globOptions?, toType?, force?, flatten?, transform?, cacheTransform?, transformPath?, noErrorOnMissing? }, ...] (should not have fewer than 1 item)
at validate (/Users/b/ionic5_apps/tests/test2/node_modules/schema-utils/dist/validate.js:96:11)
at new CopyPlugin (/Users/b/ionic5_apps/tests/test2/node_modules/copy-webpack-plugin/dist/index.js:24:30)
at Object.webpackConfiguration (/Users/b/ionic5_apps/tests/test2/node_modules/@ionic/angular-toolkit/builders/cordova-serve/index.js:55:39)
at setup (/Users/b/ionic5_apps/tests/test2/node_modules/@angular-devkit/build-angular/src/dev-server/index.js:88:46)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
My ionic info
:
Ionic CLI : 6.11.0 (/Users/b/.nvm/versions/node/v12.18.3/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 5.3.1
@angular-devkit/build-angular : 0.1000.6
@angular-devkit/schematics : 10.0.6
@angular/cli : 10.0.6
@ionic/angular-toolkit : 2.3.1
Cordova:
Cordova CLI : 10.0.0
Cordova Platforms : android 9.0.0
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.2.1, (and 4 other plugins)
Utility:
cordova-res : 0.15.1
native-run : 1.0.0
System:
NodeJS : v12.18.3 (/Users/b/.nvm/versions/node/v12.18.3/bin/node)
npm : 6.14.6
OS : macOS Catalina
Xcode : Xcode 11.3.1 Build version 11C504
**Other Information:**
I created a repo with the starter project where I see the error:
https://github.com/ASHBAW/test_livereload