3

i am using angular v10 and "angular-tree-component": "^8.5.6".but getting build error:

ERROR in node_modules/angular-tree-component/dist/angular-tree-component.d.ts:25:23 - error TS2314: Generic type 'ModuleWithProviders<T>' requires 1 type argument(s).

25     static forRoot(): ModuleWithProviders;

Using in the application like this

@NgModule({
  imports: [TreeModule],
   exports: [TreeModule]
   })

export class SharedModule { }

anything i have to do modification?

Thanks.

cj devin
  • 1,045
  • 3
  • 13
  • 48
  • now i am using angular-tree-component new version [circlon](https://www.npmjs.com/package/@circlon/angular-tree-component) and no more error – cj devin Aug 12 '20 at 17:35

1 Answers1

4

instead of "angular-tree-component", use the new library "@circlon/angular-tree-component"

npm uninstall angular-tree-component
npm i @circlon/angular-tree-component

and then, update all imports in your project from:

import {TreeComponent} from 'angular-tree-component';

to:

import {TreeComponent} from '@circlon/angular-tree-component';

and css if needed from:

@import '~angular-tree-component/dist/angular-tree-component.css';

to

@import "~@circlon/angular-tree-component/css/angular-tree-component.css";