我试图将我的 Angular 应用程序部署到 GitHub 页面,但最终出现了这个我很难理解的长错误。我在网上试过,但似乎没有任何帮助。任何建议/帮助将不胜感激。
谢谢
背景
角度版本:6.1.2
命令用于部署应用程序:
npm install -g angular-cli-ghpages
ng build --prod --base-href 存储库链接
错误
> ERROR in : Type CountryViewComponent in
> /localpath/country-view.component.ts
> is part of the declarations of 2 modules: AppModule in
> /localpath/app.module.ts and SharedModule in
> /localpath/shared.module.ts! Please
> consider moving CountryViewComponent in
> /localpath/country-view.component.ts
> to a higher module that imports AppModule in
> /localpath/app.module.ts and SharedModule in
> /localpath/shared.module.ts. You can
> also create a new NgModule that exports and includes
> CountryViewComponent in
> /localpath/country-view/country-view.component.ts
> then import that NgModule in AppModule in
> /localpath/app.module.ts and SharedModule in
> /localpath/shared.module.ts.