Encountering an error when trying to import jszip into my TypeScript component file.
After successfully running npm install jszip and confirming the package is properly installed, I proceed to import it using:
import * as JSZip from 'jszip';
This results in the following error message being displayed:
Error: node_modules/@types/node/globals.d.ts:72:13 - error TS2403: Subsequent variable declarations must have the same type. Variable 'AbortSignal' requires a type of '{ new (): AbortSignal; prototype: AbortSignal; abort(reason?: any): AbortSignal; timeout(milliseconds: number): AbortSignal; }', but currently has a type of '{ new (): AbortSignal; prototype: AbortSignal; }'.
72 declare var AbortSignal: { ~~~~~~~~~~~
node_modules/typescript/lib/lib.dom.d.ts:2071:13 2071 declare var AbortSignal: { 'AbortSignal' was also previously declared here.
The environment I am working with includes: Angular version 15.1.1 Typescript version 4.9.6 jszip version 3.10.1