Angular 2 Aot Error: 'ToastsManager' is not exported

sudhir

While performing AOT I'm facing issue with ng2-toastr which I'm using

ToastsManager' is not exported by 'node_modules\ng2-toastr\src\toast-manager.js


 'ToastModule' is not exported by 'node_modules\ng2-toastr\src\toast.module.js'.



'ToastOptions' is not exported by 'node_modules\ng2-toastr\src\toast-options.js'.

Any idea on how to resolve this? I checked all those mentioned files, they have export declare keywords with them, even checked with this site

https://github.com/rollup/rollup/wiki/Troubleshooting#name-is-not-exported-by-module

Steve Rash

You can solve this by making a change to the rollup config js file. You need to make 2 changes to the commonjs plugin config.

Here is mine after the change. Note you need to add both the extra include and the namedExports.

      plugins: [
          nodeResolve({jsnext: true, module: true}),
          commonjs({
             include: [ 
                'node_modules/rxjs/**',
                'node_modules/ng2-toastr/**'
             ],
             namedExports : { 
                'node_modules/ng2-toastr/ng2-toastr.js': [ 'ToastModule', 'ToastsManager' ] 
             }
          }),
          uglify()
       ]

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Angular2 "no exported member bootstrap" error

From Dev

Angular interpolation causing AOT compile error

From Dev

Angular cli 2 Error Can't resolve all parameters for XXXXX by AOT build

From Dev

Angular 2 Module has no exported member

From Dev

Module '"angular2/angular2"' has no exported member 'For'

From Dev

Do the ngfactory files themselves have to be compiled in Angular 2 AOT compilation?

From Dev

Angular 2 AoT compile causes application issues and works fine in JiT

From Dev

`TypeError: providers.forEach is not a function` with Angular2 in AOT build

From Dev

Running angular2 AOT and getting implicitly errors

From Dev

Angular2 AOT ngtools/webpack failed on linux

From Dev

Angular2 AOT Compilation with static external js file

From Dev

Angular 2: @angular/common/index has no exported mng 'NgSwitchWhen'

From Java

No exported member error with firebase when trying to compile angular 10 project

From Dev

AOT Angular Module

From Dev

Angular 4 AOT Compiler

From Dev

angular 5 noty and AOT

From Dev

ERROR in src/app/hero.service.ts(2,22): error TS2305: Module '"F:/angular-tour-of-heroes/node_modules/rxjs/Rx"' has no exported member 'of'

From Dev

Angular2: ngModule, BrowserModule, FormsModule are not exported members

From Dev

Error while running exported Slick2d project

From Dev

Has no exported member Angular

From Dev

Angular. Aot. Error encountered resolving symbol values statically. Could not resolve

From Dev

Angular AOT build error - Maximum call stack size exceeded, resolving symbol XXX in Path

From Dev

Is an embedded error exported?

From Dev

UIImages exported as movie error

From Dev

UIImages exported as movie error

From Dev

Angular 5 --aot Vs Angular 5 --aot=false

From Dev

Error: @angular/core/testing"' has no exported member 'beforeEach' after upgrading to angular rc.5

From Dev

Angular 4 inject console with AOT

From Dev

Bundle Angular2 AoT with systemjs-builder and rollup tree shaking

Related Related

  1. 1

    Angular2 "no exported member bootstrap" error

  2. 2

    Angular interpolation causing AOT compile error

  3. 3

    Angular cli 2 Error Can't resolve all parameters for XXXXX by AOT build

  4. 4

    Angular 2 Module has no exported member

  5. 5

    Module '"angular2/angular2"' has no exported member 'For'

  6. 6

    Do the ngfactory files themselves have to be compiled in Angular 2 AOT compilation?

  7. 7

    Angular 2 AoT compile causes application issues and works fine in JiT

  8. 8

    `TypeError: providers.forEach is not a function` with Angular2 in AOT build

  9. 9

    Running angular2 AOT and getting implicitly errors

  10. 10

    Angular2 AOT ngtools/webpack failed on linux

  11. 11

    Angular2 AOT Compilation with static external js file

  12. 12

    Angular 2: @angular/common/index has no exported mng 'NgSwitchWhen'

  13. 13

    No exported member error with firebase when trying to compile angular 10 project

  14. 14

    AOT Angular Module

  15. 15

    Angular 4 AOT Compiler

  16. 16

    angular 5 noty and AOT

  17. 17

    ERROR in src/app/hero.service.ts(2,22): error TS2305: Module '"F:/angular-tour-of-heroes/node_modules/rxjs/Rx"' has no exported member 'of'

  18. 18

    Angular2: ngModule, BrowserModule, FormsModule are not exported members

  19. 19

    Error while running exported Slick2d project

  20. 20

    Has no exported member Angular

  21. 21

    Angular. Aot. Error encountered resolving symbol values statically. Could not resolve

  22. 22

    Angular AOT build error - Maximum call stack size exceeded, resolving symbol XXX in Path

  23. 23

    Is an embedded error exported?

  24. 24

    UIImages exported as movie error

  25. 25

    UIImages exported as movie error

  26. 26

    Angular 5 --aot Vs Angular 5 --aot=false

  27. 27

    Error: @angular/core/testing"' has no exported member 'beforeEach' after upgrading to angular rc.5

  28. 28

    Angular 4 inject console with AOT

  29. 29

    Bundle Angular2 AoT with systemjs-builder and rollup tree shaking

HotTag

Archive