ngx-malihu-scrollbar icon indicating copy to clipboard operation
ngx-malihu-scrollbar copied to clipboard

Unable to import module

Open SalmanTariq opened this issue 4 years ago • 3 comments

I'm receiving this error when trying to serve after importing the MalihuScrollbarModule

ERROR in node_modules/ngx-malihu-scrollbar/src/malihu-scrollbar.module.d.ts:3:23 - error TS2314: Generic type 'ModuleWithProviders<T>' requires 1 type argument(s).
     static forRoot(): ModuleWithProviders;

The error refers to the following file

import { ModuleWithProviders } from '@angular/core';
export declare class MalihuScrollbarModule {
    static forRoot(): ModuleWithProviders;
    static forChild(): ModuleWithProviders;
}

The error is only in version 9. version 8 is working fine. Please advise. Thanks.

SalmanTariq avatar Sep 07 '20 12:09 SalmanTariq

Hi @SalmanTariq,

This is probably due to the Angular version of your application. Ngx-malihu-scrollbar v9.0.0 should be used with Angular 9.

jfcere avatar Sep 07 '20 12:09 jfcere

@jfcere I'm using Angular 10. Version 8 is working fine though in the same Angular project. Should I try adding the type in a PR?

SalmanTariq avatar Sep 09 '20 16:09 SalmanTariq

I'll update the library to Angular 10, this should fix it.

jfcere avatar Sep 13 '20 23:09 jfcere