Home > OS >  Angular "ng generate component" Duplicating Component
Angular "ng generate component" Duplicating Component

Time:02-02

For some reason since upgrading from Angular 13 to Angular 15, when I type: ng g c SomeComponent Angular duplicates the component, creating duplicate files. This happens 100% of the time. A second weird thing (not sure if it's related), but it does not add ngOnInit() to the components either. ng generate component output

CodePudding user response:

This is a known issue with Angular 15 and has been fixed in the latest version. You can update to the latest version of Angular by running the following command:

npm install -g @angular/cli@latest

if it is not solved try to reinstall the cli or send a report to the angular team

  • Related