ionic-cli
ionic-cli copied to clipboard
ng generate component is not working anymore
Description:
>ng g c todo.service.ts
An unhandled exception occurred: Schematic "appShell" not found in collection "@ionic/angular-toolkit".
See "C:\Users\user\AppData\Local\Temp\ng-jnwgAJ\angular-errors.log" for further details.
Steps to Reproduce:
Output:
An unhandled exception occurred: Schematic "appShell" not found in collection "@ionic/angular-toolkit".
See "C:\Users\user\AppData\Local\Temp\ng-jnwgAJ\angular-errors.log" for further details.
My ionic info:
Ionic:
Ionic CLI : 6.20.3 (C:\Users\user\AppData\Roaming\npm\node_modules\@ionic\cli)
Ionic Framework : @ionic/angular 6.3.1
@angular-devkit/build-angular : 14.2.6
@angular-devkit/schematics : 14.2.6
@angular/cli : 14.2.6
@ionic/angular-toolkit : 7.0.0
Capacitor:
Capacitor CLI : 4.3.0
@capacitor/android : 4.3.0
@capacitor/core : 4.3.0
@capacitor/ios : not installed
Utility:
cordova-res : 0.15.4
native-run : 1.7.1
System:
NodeJS : v14.17.1 (C:\Program Files\nodejs\node.exe)
npm : 6.14.13
OS : Windows 10
Other Information:
I am also facing the same error while generating the new component.
➜ ionic-angular-startup git:(main) : ng g c comp/users-list An unhandled exception occurred: Schematic "appShell" not found in collection "@ionic/angular-toolkit". See "/private/var/folders/tn/27m_sh4x53l_yj3s83qfdh980000gp/T/ng-JIZ9ln/angular-errors.log" for further details.
Hi, there is a similar issue at https://github.com/ionic-team/angular-toolkit/issues/470#issuecomment-1264511562
It turns out that the shorthand aliases is currently broken. (e.g. ng g c my-comp or ng g p my-page)
So we need to type the full command like ng g component my-comp or ng c page my-page as a workaround for now.
PR https://github.com/ionic-team/angular-toolkit/pull/476 should be able to reslove this issue.