【发布时间】:2020-10-03 13:17:29
【问题描述】:
我在 localhost 中使用 angular 创建了一个网站,一切正常,在 heroku 中也可以正常工作,现在我想将页面部署到我的服务器,
这里是回购:agency repo
我运行以下命令
ng build --aot
不幸的是,我收到以下错误
ERROR in : Type NgStickyDirective in C:/custom-xammp/htdocs/agency/majeni/node_modules/ng-sticky/ng-sticky.d.ts is part of the declarations of 2 modules: AppModule in C:/custom-xammp/htdocs/agency/majeni/src/app/app.module.ts and NgStickyModule in C:/custom-xammp/htdocs/agency/majeni/node_modules/ng-sticky/ng-sticky.d.ts! Please consider moving NgStickyDirective in C:/custom-xammp/htdocs/agency/majeni/node_modules/ng-sticky/ng-sticky.d.ts to a higher module that imports AppModule in C:/custom-xammp/htdocs/agency/majeni/src/app/app.module.ts and NgStickyModule in C:/custom-xammp/htdocs/agency/majeni/node_modules/ng-sticky/ng-sticky.d.ts. You can also create a new NgModule that exports and includes NgStickyDirective in C:/custom-xammp/htdocs/agency/majeni/node_modules/ng-sticky/ng-sticky.d.ts then import that NgModule in AppModule in C:/custom-xammp/htdocs/agency/majeni/src/app/app.module.ts and NgStickyModule in C:/custom-xammp/htdocs/agency/majeni/node_modules/ng-sticky/ng-sticky.d.ts.
我需要做什么来解决这个问题?
【问题讨论】:
标签: javascript angular typescript ng-build