Я использовал NgxNotificationComponent в модуле приложения.Это прекрасно работает в нг-серве.Но когда я пытаюсь собрать приложение, используя ng build --prod, оно выдает ошибку.
ERROR in : Type NgxNotificationComponent in /Development/web-
angular/node_modules/ngx-notification/ngx-notification.d.ts is part of
the declarations of 2 modules: AppModule in /Development/web-
angular/src/app/app.module.ts and NgxNotificationModule in
/Development/web-angular/node_modules/ngx-notification/ngx-
notification.d.ts! Please consider moving NgxNotificationComponent in
/Development/web-angular/node_modules/ngx-notification/ngx-
notification.d.ts to a higher module that imports AppModule in
/Development/web-angular/src/app/app.module.ts and
NgxNotificationModule in /Development/web-angular/node_modules/ngx-
notification/ngx-notification.d.ts. You can also create a new NgModule
that exports and includes NgxNotificationComponent in /Development/web-
angular/node_modules/ngx-notification/ngx-notification.d.ts then import
that NgModule in AppModule in /Development/web-
angular/src/app/app.module.ts and NgxNotificationModule in
/Development/web-angular/node_modules/ngx-notification/ngx-
notification.d.ts
Нужно ли менять сам модуль узла или есть обходные пути?
Версии следующие
"ngx-notification": "^1.0.5",
Зависимости разработчиков
"@angular-devkit/build-angular": "~0.11.0",
"@angular/cli": "~7.1.4",