0

I'm trying to do

yauzl.open(path, options, (err, zipfile) => {
    //code
})

when zipfile is supposed to be of type ZipFile

On one computer everything is fine, on the other one I keep getting undefined.

The only differences between the too is that I downloaded the yauzl module using npm install yauzl then copied the node_modules folder + the package.json & package-lock.json to the second computer (it's offline so I cant directly install onto it)

It never did any problems up until now, and when I tried copying the entire project back to the first computer from the second computer it works!

Any idea?

Pictures for references:

On the first computer (working one): enter image description here

On the second computer (not working one): enter image description here

PS The null on this picture is the options object and zipfile still shows up as undefined even with something in it.

SkyNess
  • 55
  • 8

1 Answers1

0

Well, the zip file I used was apparently corrupted and empty, which made the ZipFile to return as undefined.

Took me way too long to realise that.

SkyNess
  • 55
  • 8