scttcper / ngx-toastr

🍞 Angular Toastr
https://ngx-toastr.vercel.app
MIT License
2.5k stars 360 forks source link

ModuleWithProviders from angular/compiler/src/core not exported #921

Closed zvyezdan closed 2 years ago

zvyezdan commented 2 years ago

Hello,

trying to maven compile

ng build --configuration=local --output-hashing none && node build-elements.js

and getting this error:

[ERROR] Error: node_modules/ngx-toastr/toastr/toast-noanimation.component.d.ts:1:10 - error TS2305: Module '"@angular/compiler/src/core"' has no exported member 'ModuleWithProviders'.
[ERROR]
[ERROR] 1 import { ModuleWithProviders } from '@angular/compiler/src/core';

The env is as follows:

[INFO] Node v16.14.0 is already installed.
[INFO] NPM 8.5.0 is already installed.
Angular CLI: 13.2.3
Node: 16.14.0
Package Manager: npm 8.5.0
OS: win32 x64

Angular: undefined
...

Package                             Version
-------------------------------------------------------------
@angular-devkit/architect           0.1302.3
@angular-devkit/build-angular       13.2.3
@angular-devkit/core                13.2.3
@angular-devkit/schematics          13.2.3
@angular/animations                 13.2.2
@angular/cdk                        13.2.2
@angular/cli                        13.2.3
@angular/common                     13.2.2
@angular/compiler                   13.2.2
@angular/compiler-cli               13.2.2
@angular/elements                   13.2.2
@angular/forms                      13.2.2
@angular/language-service           13.2.2
@angular/material                   13.2.2
@angular/platform-browser           13.2.2
@angular/platform-browser-dynamic   13.2.2
@angular/router                     13.2.2
@schematics/angular                 13.2.3

This very much looks like a version conflict.... appreciate any insight!

Thanks! Dan

scttcper commented 2 years ago

what version of ngx-toastr are you using

zvyezdan commented 2 years ago

$ npm list | grep ngx-toastr └── ngx-toastr@14.2.1

zvyezdan commented 2 years ago

Here's some more of compile output that looks relevant.. .possibly

[INFO] > ng build --configuration=local --output-hashing none && node build-elements.js
[INFO]
[ERROR] - Generating browser application bundles (phase: setup)...
[ERROR] Warning: Entry point 'ngx-papaparse' contains deep imports into 'c:/tools/workspace/comp/comp-uservice/col-uservice/col-application-uservice/frontend/node_modules/papaparse/papaparse.min.js'. This is probably not a problem, but may cause the compilation of entry points to be out of order.
[ERROR] Warning: Entry point 'ngx-toastr' contains deep imports into 'c:/tools/workspace/comp/comp-uservice/col-uservice/col-application-uservice/frontend/node_modules/@angular/compiler/src/core'. This is probably not a problem, but may cause the compilation of entry points to be out of order.
[ERROR] Processing legacy "View Engine" libraries:
[ERROR] - @tinymce/tinymce-angular [es2015/esm2015] (https://github.com/tinymce/tinymce-angular.git)
[ERROR] - @ng-bootstrap/ng-bootstrap [es2015/esm2015] (git+https://github.com/ng-bootstrap/ng-bootstrap.git)
[ERROR] - ngx-papaparse [es2015/esm2015] (https://github.com/alberthaff/ngx-papaparse)
[ERROR] - ngx-toastr [es2015/esm2015] (scttcper/ngx-toastr)
[ERROR] Encourage the library authors to publish an Ivy distribution.
[ERROR] √ Browser application bundle generation complete.
[ERROR] √ Browser application bundle generation complete.
[ERROR]
[ERROR] Error: node_modules/ngx-toastr/toastr/toast-noanimation.component.d.ts:1:10 - error TS2305: Module '"@angular/compiler/src/core"' has no exported member 'ModuleWithProviders'.
[ERROR]
[ERROR] 1 import { ModuleWithProviders } from '@angular/compiler/src/core';
[ERROR]            ~~~~~~~~~~~~~~~~~~~
scttcper commented 2 years ago

How are you importing ngx-toastr and also try removing your node_modules and reinstalling

zvyezdan commented 2 years ago

Ah... that's what it is...

"ngx-toastr": "^10.1.0",

thanks for quick response, fully appreciated! Cheers!