ionic-cli icon indicating copy to clipboard operation
ionic-cli copied to clipboard

ng generate component is not working anymore

Open indraraj26 opened this issue 3 years ago • 2 comments

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:

indraraj26 avatar Oct 23 '22 05:10 indraraj26

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.

vinukumar-vs avatar Dec 11 '22 16:12 vinukumar-vs

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.

jonz94 avatar Dec 25 '22 04:12 jonz94