Vladimir Melekh Vladimir Melekh - 1 month ago 28
TypeScript Question

Angular2 bootstrap error: Error: No ExceptionHandler. Is platform module (BrowserModule) included?

I have a problem with running angular 2 application. During call of

import { PlatformRef } from '@angular/core/src/application_ref';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './components2/app.module';


const platform: PlatformRef = platformBrowserDynamic();
platform.bootstrapModule(AppModule);


I have this error:
enter image description here

This is weird error, because BrowserModule is included:

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

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


Thanks in advance.

Answer

Thanks everybody for comments and help. The problem was that in other file I had dependency to 'q-io/fs' package. Removing that, angular started without any additional manipulations.