Tried to find bootstrap code, but could not specify either statically analyzable bootstrap code

OS:Windows 10
Versions.
Node: v7.2.0
npm 3.10.9
Angular: 2.0.0-beta.8

main.ts

 import {platformBrowserDynamic} from '@angular/platform-browser-dynamic';
        import {BrowserModule} from '@angular/platform-browser';
        import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
        import {NgModule} from '@angular/core';
        import {FormsModule, ReactiveFormsModule} from '@angular/forms';
        import {
        MdAutocompleteModule,
        MdButtonModule,
        MdButtonToggleModule,
        MdCardModule,
        MdCheckboxModule,
        MdChipsModule,
        MdCoreModule,
        MdDatepickerModule,
        MdDialogModule,
        MdExpansionModule,
        MdGridListModule,
        MdIconModule,
        MdInputModule,
        MdListModule,
        MdMenuModule,
        MdNativeDateModule,
        MdPaginatorModule,
        MdProgressBarModule,
        MdProgressSpinnerModule,
        MdRadioModule,
        MdRippleModule,
        MdSelectModule,
        MdSidenavModule,
        MdSliderModule,
        MdSlideToggleModule,
        MdSnackBarModule,
        MdSortModule,
        MdTableModule,
        MdTabsModule,
        MdToolbarModule,
        MdTooltipModule,
        } from '@angular/material';
        import {InputFormExample} from './input-form-example';
        import {HttpModule} from '@angular/http';
        import {CdkTableModule} from '@angular/cdk';
        
        @NgModule({
        exports: [
        CdkTableModule,
        MdAutocompleteModule,
        MdButtonModule,
        MdButtonToggleModule,
        MdCardModule,
        MdCheckboxModule,
        MdChipsModule,
        MdCoreModule,
        MdDatepickerModule,
        MdDialogModule,
        MdExpansionModule,
        MdGridListModule,
        MdIconModule,
        MdInputModule,
        MdListModule,
        MdMenuModule,
        MdNativeDateModule,
        MdPaginatorModule,
        MdProgressBarModule,
        MdProgressSpinnerModule,
        MdRadioModule,
        MdRippleModule,
        MdSelectModule,
        MdSidenavModule,
        MdSliderModule,
        MdSlideToggleModule,
        MdSnackBarModule,
        MdSortModule,
        MdTableModule,
        MdTabsModule,
        MdToolbarModule,
        MdTooltipModule,
        ]
        })
        export class PlunkerMaterialModule {}
        
        @NgModule({
        
        imports: [
        BrowserModule,
        BrowserAnimationsModule,
        FormsModule,
        HttpModule,
        PlunkerMaterialModule,
        MdNativeDateModule,
        ReactiveFormsModule,
        ],
        
        declarations: [InputFormExample],
        bootstrap: [InputFormExample],
        providers: []
        })
    export class AppModule{}
    platformBrowserDynamic().bootstrapModule(AppModule);

`

app.module.ts

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

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

The log given by the failure.

Error: Tried to find bootstrap code, but could not. Specify either
statically analyzable bootstrap code or pass in an entryModule to the
plugins options.

Full stack trace:

at Object.resolveEntryModuleFromMain
(C:\Users\saish\Documents\my-app\node_modules@ngtools\webpack\src\entry_resolver.js:128:11)
at AotPlugin._setupOptions
(C:\Users\saish\Documents\my-app\node_modules@ngtools\webpack\src\plugin.js:138:50)
at new AotPlugin
(C:\Users\saish\Documents\my-app\node_modules@ngtools\webpack\src\plugin.js:23:14)
at _createAotPlugin
(C:\Users\saish\Documents\my-app\node_modules@angular\cli\models\webpack-configs\typescript.js:55:12)
at Object.exports.getNonAotConfig
(C:\Users\saish\Documents\my-app\node_modules@angular\cli\models\webpack-configs\typescript.js:70:19)
at NgCliWebpackConfig.buildConfig
(C:\Users\saish\Documents\my-app\node_modules@angular\cli\models\webpack-config.js:27:37)
at Class.run
(C:\Users\saish\Documents\my-app\node_modules@angular\cli\tasks\serve.js:37:98)
at check_port_1.checkPort.then.port
(C:\Users\saish\Documents\my-app\node_modules@angular\cli\commands\serve.js:103:26)
at process._tickCallback (internal/process/next_tick.js:103:7)

npm ERR! Windows_NT 10.0.15063 npm ERR! argv “C:\Program
Files\nodejs\node.exe” “C:\Program
Files\nodejs\node_modules\npm\bin\npm-cli.js” “start” npm ERR! node
v7.2.0 npm ERR! npm v3.10.9 npm ERR! code ELIFECYCLE npm ERR!
my-app@0.0.0 start: ng serve npm ERR! Exit status 1 npm ERR! npm ERR!
Failed at the my-app@0.0.0 start script ‘ng serve’. npm ERR! Make sure
you have the latest version of node.js and npm installed. npm ERR! If
you do, this is most likely a problem with the my-app package, npm
ERR! not with npm itself. npm ERR! Tell the author that this fails on
your system: npm ERR! ng serve npm ERR! You can get information on how
to open an issue for this project with: npm ERR! npm bugs my-app npm
ERR! Or if that isn’t available, you can get their info via: npm ERR!
npm owner ls my-app npm ERR! There is likely additional logging output
above.

npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\saish\Documents\my-app\npm-debug.log

I think there is a problem with the naming. Is there an app.component or app.component.js? I’m not 100% how angular wants these components named.
What does your app.component.js contain? it looks like it is not initialized correctly.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.