'When trying to import GeoTiff source in openlayers get error TS2304 AbstractDecoder

When I try to compile my web application using Angular 12 and Open layers if I try to compile the code with the line

import GeoTIFF from 'ol/source/GeoTIFF';

I get 2 errors.

Error: node_modules/geotiff/dist-node/geotiffimage.d.ts:67:118 - error TS2304: Cannot find name 'Source'.

This error I resolved by adding an import to ol/source/Source.

the last error I get which I cant find anywhere else online when I search for it is

Error: node_modules/geotiff/dist-node/geotiffimage.d.ts:136:100 - error TS2304: Cannot find name 'AbstractDecoder'.

which I cant find any way to import or any documentation on.

I installed OL with the by npm install ol and npm install @types/ol and its a fresh project from there so I have no idea why I'm getting this error or how to resolve it.

Any advice to resolve this or links to resources would be greatly appreciated



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source