Cant generate a service — Invalid rule result: Function()

1.6k views Asked by At

After adding an angular Universal server to my app i get the following problem

how come when i do ng g c cname i get Invalid rule result: Function() !?

@angular-devkit/architect         0.6.8
@angular-devkit/build-angular     0.6.8
@angular-devkit/build-optimizer   0.6.8
@angular-devkit/core              0.6.8
@angular-devkit/schematics        0.7.5
@angular/cli                      6.0.8
@angular/fire                     5.0.0
@angular/pwa                      0.6.8
@ngtools/webpack                  6.0.8
@schematics/angular               0.7.5
@schematics/update                0.6.8
rxjs                              6.3.2
typescript                        2.7.2
webpack                           4.8.3

the suggestions here are not working for me https://github.com/angular/angular-cli/issues/11663

1

There are 1 answers

0
Vishal Soriya On

Following steps should work.

  • Deleting node_modules and package.json file root directory
  • sudo npm uninstall -g @angular/[email protected]
  • sudo npm install -g @angular/[email protected]
  • Relaunch the terminal and run 'ng new '