David J
David J

Reputation: 1098

Angular "ng generate component" Duplicating Component

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

Upvotes: 3

Views: 169

Answers (1)

David J
David J

Reputation: 1098

Yes, the answer was upgrading. Someone already answered this, but the answer is not here. It was a bug in Angular. In the short term I just deleted the duplicate files. But when I upgraded the problem went away.

Upvotes: 0

Related Questions