Vladimir Melekh Vladimir Melekh - 3 months ago 73
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();

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";

imports: [BrowserModule, FormsModule],
declarations: [AppComponent],
bootstrap: [AppComponent]
export class AppModule {}

Thanks in advance.


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.