Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript Angular Basics Angular Components Nesting Components

ross Carhart
ross Carhart
5,341 Points

Cannot find module

export * from './entry-list/entry-list.component';
export * from './entry/entry.component';

Let me know what additional information is needed. I have re watched this video multiple times and I can not find out why this is not loading but it worked fine for the entry-list.

My index.ts file is located under the entries folder.

app.module.ts

import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { AppComponent } from './app.component';
import { EntryListComponent, EntryComponent } from './entries';


@NgModule({
    imports: [BrowserModule],
    declarations: [
        AppComponent, 
        EntryListComponent
    ],
    bootstrap: [AppComponent]
})
export class AppModule {


}

1 Answer

Kevin Lassar
Kevin Lassar
22,440 Points

Hi Ross

Your app.module.ts file is missing the EntryComponent reference in the declarations array within @NgModule

I provided the correct code below for reference

@NgModule({
    imports: [BrowserModule],
    declarations: [
        AppComponent,
        EntryComponent,
        EntryListComponent
    ],
    bootstrap: [AppComponent]
})
export class AppModule {

}