rf00 / minizip-asm.js

Minizip in javascript. Work with password. Demo:
https://rf00.github.io/minizip-asm.js/example/
Other
42 stars 17 forks source link

Cannot read property 'TYPED_ARRAY_SUPPORT' of undefined at Object #8

Open ankit9607 opened 4 years ago

ankit9607 commented 4 years ago

I am using this library with Angular 8 when I install it with NPM and used it with var Minizip = require('minizip-asm.js'); its throwing error :

minizip-asm.min.js:18 Uncaught TypeError: Cannot read property 'TYPED_ARRAY_SUPPORT' of undefined at Object. (minizip-asm.min.js:18) at Object. (minizip-asm.min.js:18) at r (minizip-asm.min.js:1) at Object. (minizip-asm.min.js:17) at r (minizip-asm.min.js:1) at Object. (minizip-asm.min.js:14) at Object. (minizip-asm.min.js:14) at r (minizip-asm.min.js:1) at minizip-asm.min.js:1 at minizip-asm.min.js:1

wayne-knowmeq commented 9 months ago

In my case, It was because I used the wrong way to import the package. The framework is Next.js Instead of using import Minizip from "minizip-asm.js"; you should use the old js way, const Minizip = require('minizip-asm.js');