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 Setting Up an Angular Application Your First Angular Application

Michael Caveney
Michael Caveney
50,144 Points

Application not compiling

I'm having some problems with the "Your First Angular Application video". The project won't compile. First, my relevant source code:

app.module.ts

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


@NgModule({
    imports: [BrowserModule], 
    declarations: [AppComponent], 
    bootstrap: [AppComponent]
})

export class AppModule {

}

and main.ts:

import './styles/main.css';
import {platformBrowserDynamic} from '@angular/platform-browser-dynamic';
import { AppModule } from './app/app.module';

platformBrowserDynamic().bootstrapModule(AppModule);

I'm getting a warning from Sublime on the AppModule export that "Experimental support for decorators blah blah blah....". This setting is "true" in my package.json, so I have no ide what to do about that. This seems to be tied into the error of main.ts being unable to find the app module. Any help would be greatly appreciated.

Your code is exactly same as mine line for line and my project is compiling. I even cut 'n pasted your code into my files and it still works. I believe the problems lies somewhere else.