M
M
Maxim Ivanov2017-05-01 15:00:55
Angular
Maxim Ivanov, 2017-05-01 15:00:55

How to start AOT if it swears at incomprehensible errors?

When I run an AOT build with @ngtools/webpack my build crashes with this error
x4_iQOnFR4s.jpg

ERROR in Unexpected value 'BrowserAnimationsModule in /home/splincode/Develop/blackbox/ui-util/webapp/source/node_modules/@angular/platform-browser/animations/index.d.ts' imported by the module 'AppModule in /home/splincode/Develop/blackbox/ui-util/webapp/source/app/app.module.ts'. Please add a @NgModule annotation.

But I explicitly imported the BrowserAnimationsModule, what doesn't he like?
import {NgModule} from "@angular/core";
import {BrowserModule} from "@angular/platform-browser";
import {HttpModule, JsonpModule} from "@angular/http";
import {FormsModule, ReactiveFormsModule} from "@angular/forms";
import {AppComponent} from "./app.component";
import {AuthComponent} from "./component/auth/auth.component";
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';

import {AppState} from "./app.service";

@NgModule({
  imports: [
    BrowserModule,
    HttpModule,
    JsonpModule,
    FormsModule,
    ReactiveFormsModule,
    BrowserAnimationsModule
  ],
  declarations: [
    AppComponent,
    AuthComponent
  ],
  providers: [
      AppState
  ],
  bootstrap: [AppComponent]
})
export class AppModule { }

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Severus256, 2017-05-01
@severus256

and BrowserAnimationsModule is installed?
try npm install @angular/animation

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question