Skip to content
This repository was archived by the owner on Feb 6, 2025. It is now read-only.

Unable to import module #63

Open
SalmanTariq opened this issue Sep 7, 2020 · 3 comments · May be fixed by #65
Open

Unable to import module #63

SalmanTariq opened this issue Sep 7, 2020 · 3 comments · May be fixed by #65

Comments

@SalmanTariq
Copy link

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.

@jfcere
Copy link
Owner

jfcere commented Sep 7, 2020

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.

@SalmanTariq
Copy link
Author

@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?

@jfcere
Copy link
Owner

jfcere commented Sep 13, 2020

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

@jfcere jfcere linked a pull request Sep 16, 2020 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants