无法推送角度应用程序进行生产 - 请添加@NgModule注释

时间:2018-02-27 13:08:26

标签: javascript angular module production-environment

我在使用push app进行制作时出现问题。在当地一切都很完美。但是,当我使用'ng build --prod --base-href“https:/// p”'我喜欢沟通,如下:

ERROR in : Unexpected value 'SimpleSmoothScrollModule in 
/home/magda/Desktop/portfolioTest/portfolio_angular4/node_modules/ng2-
simple-smooth-scroll/lib/index.js' imported by the module 'AppModule 
in/home/magda/Desktop/portfolioTest/portfolio_angular4/src/app/app.module.ts'. Please add a @NgModule annotation.

有什么不对?下面是我的app.module.ts文件。

import { AboutMeComponent } from './about-me/about-me.component';
import { InitialNavComponent } from './initial-nav/initial-
nav.component';
import { IntroductionComponent } from 
'./introduction/introduction.component';
import { PortfolioComponent } from './portfolio/portfolio.component';
import { SkillsComponent } from './skills/skills.component';
import { ContactComponent } from './contact/contact.component';
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { CollapseModule } from 'ngx-bootstrap';
import { ReactiveFormsModule, FormsModule } from '@angular/forms';
import { HttpModule } from '@angular/http';
import { NgsRevealModule } from 'ng-scrollreveal'; 
import { AppComponent } from './app.component';
import { SimpleSmoothScrollModule } from 'ng2-simple-smooth-scroll';
import { BsModalModule } from 'ng2-bs3-modal';



@NgModule({
  declarations: [
    AppComponent,
    InitialNavComponent,
    AboutMeComponent,
    IntroductionComponent,
    PortfolioComponent,
    SkillsComponent,
    ContactComponent
  ],
  imports: [
    BrowserModule,
    FormsModule,
    HttpModule,
    NgsRevealModule.forRoot(),
    ReactiveFormsModule,
    CollapseModule.forRoot(),
    SimpleSmoothScrollModule,
    BsModalModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

感谢您的任何提示!

0 个答案:

没有答案