3

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

2
  • Hi @David, im working with angular15 but no problem on creating new components Commented Feb 1, 2023 at 15:39
  • Has anyone found a solution to this? I am working with Angular 16 and recently ran into this problem as well. It also does the same thing when trying to generate services for me. Commented Jan 10, 2024 at 3:11

1 Answer 1

0

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.