jszip
jszip copied to clipboard
Cannot find module 'jszip' or its corresponding type declarations.
Hey guys!
I have been working with JSZip to archive CSV outputs for years in a JS web app (using Node and React)
I am now working on a TypeScript app (with React and Node too) and need to use JSZip again. I was quite happy it had Typescript built-in directly!
However, when I try to import JSZip I get the following error from my browser (Firefox 95.0.1):

I tried the following import methods:
import * as JSZip from "jszip"
// or
import JSZip from "jszip"
I am using JSZip 3.7.1, and already found out the following issue which could have been a solution: https://github.com/Stuk/jszip/pull/614.
Other main packages of my app:
react:16.14.0@types/node:12.20.10webpack:4.29.6
Even though the package is deprecated, I still tried to install @types/jszip 3.4.1 but it didn't fix the issue.
Any insight on what I'm doing wrong maybe?
did you try running your local app on chrome ?? also try restarting VScode and the local server once....
Try deleting node_modules and reinstalling the packages.