angulartypescriptionic-frameworkcapacitorangular-schematics

trying to add @ionic/angular to existing angular 12 app fails


When trying to run:

ng add @ionic/angular

to this existing repo: https://github.com/skyleguy/angular-capacitor-project-base

results in:

ℹ Using package manager: npm
✔ Found compatible package version: @ionic/angular@5.6.12.
✔ Package information loaded.
 
The package @ionic/angular@5.6.12 will be installed and executed.
Would you like to proceed? Yes
✔ Package successfully installed.
"ionicNgAdd" schema is using the keyword "id" which its support is deprecated. Use "$id" for schema ID.
Cannot read property 'options' of undefined

All I have done in this project is switch from jasmine -> jest, setup prettier/husky/lint-stage, and go from tslint -> eslint. If i run ng add @ionic/angular in my fresh angular 12 application it works fine! Can anyone give me some info as to why this is happening? I feel like I've even seen this error before and it was some small config-related issue.


Solution

  • Ended up just copying the changes that were made from running the same command in the fresh angular 12 app into my existing app and everything worked. not sure why the command was failing in the first place though.