Angular 2 cli ng build --prod

2

When executing any of these two commands

  • ng build --prod
  • ng serve --prod

I get the following error.

EXCEPTION: Uncaught (in promise): Error: Cannot find 'default' in 'app/home/home.module'
Error: Cannot find 'default' in 'app/home/home.module'.

HomeModule Code

@NgModule({
  imports: [
    CommonModule,
    ReactiveFormsModule,
    FormsModule,
    HeaderModule,
    routes
  ],
  declarations: [ModelComponent, HomeComponent, CardComponent, DurationPipe],
  providers: [VideoService]
})
export default class HomeModule {
  constructor() {}
}
    
asked by Jinder 07.03.2017 в 10:55
source

1 answer

0

The problem should be in the home.routing see that you are importing the components well or you are not doing something wrong like the use of:

<default></default>

Could you please comment on what you have in the routing?

    
answered by 22.03.2017 в 15:13