Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find module 'jszip' or its corresponding type declarations. #811

Open
Fleuh opened this issue Mar 8, 2022 · 2 comments
Open

Cannot find module 'jszip' or its corresponding type declarations. #811

Fleuh opened this issue Mar 8, 2022 · 2 comments

Comments

@Fleuh
Copy link

Fleuh commented Mar 8, 2022

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):
Screenshot from 2022-03-08 15-49-05

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: #614.

Other main packages of my app:

  • react : 16.14.0
  • @types/node: 12.20.10
  • webpack: 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?

@appsplash99
Copy link

appsplash99 commented Mar 19, 2022

did you try running your local app on chrome ??
also try restarting VScode and the local server once....

@jzombie
Copy link

jzombie commented Jun 22, 2022

Try deleting node_modules and reinstalling the packages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants