Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

JavaScript

Ludwing Najera
Ludwing Najera
4,596 Points

Cannot resolve file or directory entry.component.css

I am in a bit of a pickle here. I am doing the Nesting Components part of Angular Basics, and there is one problem that I just can't seem to figure out. My specific error is:

ERROR in ./src/app/entries/entry/entry.component.ts
Module not found: Error: Cannot resolve 'file' or 'directory' ./entry.component.css in /Users/GabeNajera/Desktop/angular_basics_2017/stage_2_video_2_start/src/app/entries/entry
 @ ./src/app/entries/entry/entry.component.ts 21:17-49

I have actually used FileMerge in order to compare my program with the working version, but although I have verified that the two programs are identical, my program keeps spitting this error back at me. One strange thing that I did notice is that by taking away the .css in entry.component.css, the program would clear but I couldn't get the desired results. I have no idea what is going on, and I hope I can get some help here.

I will paste my code here, request if you want more:

entry.component.ts:

import { Component } from '@angular/core';

@Component({
    selector: 'app-entry',
    templateUrl: 'entry.component.html',
    styleUrls: ['entry.component.css']
})

export class EntryComponent {

}

entry-list.component.ts:

import { Component } from '@angular/core';

@Component({
    selector: 'app-entry-list',
    templateUrl: 'entry-list.component.html',
    styleUrls: ['entry-list.component.css']
})

export class EntryListComponent {

}

app.component.ts:

import { Component } from '@angular/core';

@Component({
    selector: 'app-root',
    templateUrl: 'app.component.html',
    styleUrls: ['app.component.css']
})
export class AppComponent {
    emoji = ['?', '?', '?', '?'];
    activeEmoji: string;
    changeEmoji() {
        this.activeEmoji = this.emoji[Math.floor(Math.random() * this.emoji.length)];
    }
}

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,
        EntryComponent,
        EntryListComponent
    ],
    bootstrap: [AppComponent]
})
export class AppModule {

}

index.ts:

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

Thank you in advance!