aspnetcore-angular-universal: ngx-bootstrap aot error

I’ve tried to build aot version with that component:

 "@angular/animations": "4.2.2",
    "@angular/common": "4.2.2",
    "@angular/compiler": "4.2.2",
    "@angular/compiler-cli": "4.2.2",
    "@angular/core": "4.2.2",
    "@angular/forms": "4.2.2",
    "@angular/http": "4.2.2",
    "@angular/platform-browser": "4.2.2",
    "@angular/platform-browser-dynamic": "4.2.2",
    "@angular/platform-server": "4.2.2",
    "@angular/router": "4.2.2",
    "@types/node": "8.0.0",
   "ngx-bootstrap": "^1.7.1",

but there are something wrong, I’ve received that message:

 ERROR in ./Client/ngfactory/~/ngx-bootstrap/modal/modal-backdrop.component.ngfactory.ts
    Module parse failed: S:\EMPREGOS\Core\Universal_Bacon\Angular_File_by_File\Client\ngfactory\node_modules\ngx-bootstrap\modal\modal-backdrop.component.ngfactory.ts Unexpected token (12:35)
    You may need an appropriate loader to handle this file type.
    | import * as i1 from './modal-backdrop.component.ngfactory';
    | import * as i2 from 'ngx-bootstrap/modal/modal-backdrop.component';
    | const styles_ModalBackdropComponent:any[] = ([] as any[]);
    | export const RenderType_ModalBackdropComponent:i0.RendererType2 = i0.ɵcrt({encapsulation:2,
    |     styles:styles_ModalBackdropComponent,data:{}});
     @ ./Client/ngfactory/app/server-app.module.ngfactory.ts 10:0-93
     @ ./Client/main.server.aot.ts

    ERROR in ./Client/ngfactory/~/ngx-bootstrap/Typeahead/typeahead-container.component.ngfactory.ts
    Module parse failed: S:\EMPREGOS\Core\Universal_Bacon\Angular_File_by_File\Client\ngfactory\node_modules\ngx-bootstrap\Typeahead\typeahead-container.component.ngfactory.ts Unexpected token (13
:40)
    You may need an appropriate loader to handle this file type.
    | import * as i2 from 'ngx-bootstrap/Typeahead/typeahead-container.component';
    | import * as i3 from './typeahead-container.component.ngfactory';
    | const styles_TypeaheadContainerComponent:any[] = ([] as any[]);
    | export const RenderType_TypeaheadContainerComponent:i0.RendererType2 = i0.ɵcrt({encapsulation:2,
    |     styles:styles_TypeaheadContainerComponent,data:{}});
     @ ./Client/ngfactory/app/server-app.module.ngfactory.ts 11:0-102
     @ ./Client/main.server.aot.ts

    ERROR in ./Client/ngfactory/~/ngx-bootstrap/typeahead/typeahead-container.component.ngfactory.ts
    Module parse failed: S:\EMPREGOS\Core\Universal_Bacon\Angular_File_by_File\Client\ngfactory\node_modules\ngx-bootstrap\typeahead\typeahead-container.component.ngfactory.ts Unexpected token (13
:40)
    You may need an appropriate loader to handle this file type.
    | import * as i2 from 'ngx-bootstrap/typeahead/typeahead-container.component';
    | import * as i3 from './typeahead-container.component.ngfactory';
    | const styles_TypeaheadContainerComponent:any[] = ([] as any[]);
    | export const RenderType_TypeaheadContainerComponent:i0.RendererType2 = i0.ɵcrt({encapsulation:2,
    |     styles:styles_TypeaheadContainerComponent,data:{}});
     @ ./Client/ngfactory/app/server-app.module.ngfactory.ts 14:0-102
     @ ./Client/main.server.aot.ts

Whats wrong? Do I need to put anything else in webpack?

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 15 (7 by maintainers)

Most upvoted comments

I use this repo with the next version of ngx-bootstrap. Try updating your package.json to ^2.0.0-beta.2