Search code examples
angulartypescriptcanvasdatagrid

Canvas-DataGrid Issue with Angular due to not finding /dist/types.d.ts file


I am trying to run canvas-datagrid in my angular project and have been observing this error even after installing it in different ways like deleting node_modules, package.lock.json etc.,

node_modules/canvas-datagrid/dist/types.d.ts(212,37): error TS2694: Namespace 'canvasDatagrid' has no exported member 'formatter'.    
node_modules/canvas-datagrid/dist/types.d.ts(213,34): error TS2694: Namespace 'canvasDatagrid' has no exported member 'dataTypes'.    
node_modules/canvas-datagrid/dist/types.d.ts(301,30): error TS2304: Cannot find name 'column'.
node_modules/canvas-datagrid/dist/types.d.ts(307,28): error TS2304: Cannot find name 'column'.
node_modules/canvas-datagrid/dist/types.d.ts(317,25): error TS2304: Cannot find name 'column'.
node_modules/canvas-datagrid/dist/types.d.ts(454,43): error TS2304: Cannot find name 'header'.
node_modules/canvas-datagrid/dist/types.d.ts(507,57): error TS2304: Cannot find name 'cell'.
node_modules/canvas-datagrid/dist/types.d.ts(514,45): error TS2304: Cannot find name 'cell'.
node_modules/canvas-datagrid/dist/types.d.ts(519,34): error TS2304: Cannot find name 'rect'.
node_modules/canvas-datagrid/dist/types.d.ts(524,33): error TS2304: Cannot find name 'schema'.
node_modules/canvas-datagrid/dist/types.d.ts(535,31): error TS2304: Cannot find name 'rect'.
node_modules/canvas-datagrid/dist/types.d.ts(603,22): error TS2304: Cannot find name 'rect'.
node_modules/canvas-datagrid/dist/types.d.ts(623,32): error TS2694: Namespace 'canvasDatagrid' has no exported member 'formatter'.    
node_modules/canvas-datagrid/dist/types.d.ts(627,29): error TS2694: Namespace 'canvasDatagrid' has no exported member 'sorter'.       
node_modules/canvas-datagrid/dist/types.d.ts(631,29): error TS2694: Namespace 'canvasDatagrid' has no exported member 'filter'.       
node_modules/canvas-datagrid/dist/types.d.ts(639,26): error TS2694: Namespace 'canvasDatagrid' has no exported member 'data'.
node_modules/canvas-datagrid/dist/types.d.ts(643,28): error TS2694: Namespace 'canvasDatagrid' has no exported member 'schema'.       
node_modules/canvas-datagrid/dist/types.d.ts(715,5): error TS2300: Duplicate identifier 'isChildGrid'```

It would be awesome , if someone could show me the way to proceed with the same?

Thanks

Solution

  • This means you're using a newer version of the package not compatible with your old version of angular.

    I tried to install this package on an app on angular 8 and ran into this issue. I went back to version 0.22.12 of the package and the issue is gone.