cannot resolve symbol NgxPaginationModule

有些话、适合烂在心里 提交于 2019-12-13 03:46:44

问题


I am trying to use NgxPaginationModule in my Angular5 project cannot resolve symbol NgxPaginationModule , i followed all step as documented

app.module.ts

    import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
import { GlobalModule } from './global/global.module';
import { ProtectedModule} from './protetcted/protect-module.component';
import { AppRoutingModule } from './app.routing.module';
import {NgxPaginationModule} from 'ngx-pagination';//cannot resolve symbol NgxPaginationModule


@NgModule({
  declarations: [
    AppComponent,

  ],
  imports: [
    BrowserModule,
    GlobalModule,
    ProtectedModule,
    AppRoutingModule,
    NgxPaginationModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

I checked node modules and ngx-pagination folder exist can any one suggest what causing this error?


回答1:


This same thing is happening to me during an Azure CI build:

Could not resolve ngx-pagination relative to D:/a/7/s/src/app/app.module.ts. Cannot find module 'ngx-pagination

app.module.ts:

// import { NgxPaginationModule } from 'ngx-pagination'; // <-- import the module imports: [ BrowserModule, FormsModule, ReactiveFormsModule, HttpClientModule, AppRoutingModule, NgbModule.forRoot(), // NgxPaginationModule ],

Works fine locally.



来源:https://stackoverflow.com/questions/50060938/cannot-resolve-symbol-ngxpaginationmodule

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!