When generating new Angular 2 components in a .NET Core project, you may run into the following errors (as of version 0.8.3):
Error locating module for declaration
SilentError: No module files found
OR
No app module found. Please add your new Class to your component.
Identical ClientApp/app/app.module.ts
[SOLUTION]
Rename app.module.client.ts to app.client.module.ts
Open app.client.module.ts: prepend the declaration with 3 dots “...” and wrap the declaration in brackets.
For example: [...sharedConfig.declarations, <MyComponent>]
Open boot-client.ts: update your import to use the new app.client.module reference.
For example: import { AppModule } from './app/app.client.module';
Now try to generate the new component: ng g component my-component
[EXPLANATION]
Angular CLI looks for a file named app.module.ts in your project, and tries to find a references for the declarations property to import the component. This should be an array (as the sharedConfig.declarations is), but the changes do not get applied
[SOURCES]