Open RWOverdijk opened 7 years ago
I'm getting similar errors @RWOverdijk. I'd like to debug. Are you able to provide a file (or URL) to test this with that shows the error?
@mtharrison I was using this to download the google chromecast sdk. I worked around it by simply downloading the file first, and then creating a read stream from disk.
Do you know the URL for that? I tried https://developers.google.com/cast/downloads/GoogleCastSDK-Public-3.4.0-Release-ios.zip
and it works with the above code. May I ask what OS you're on?
https://developers.google.com/cast/downloads/GoogleCastSDK-Public-3.1.1-Release-ios.zip for instance. (old, I know)
Mac os
Thanks, I'm also on Mac OSX. I tried to run your code above and it's executing just fine with that URL:
const SDK_URL = 'https://developers.google.com/cast/downloads/GoogleCastSDK-Public-3.1.1-Release-ios.zip';
const request = require('request');
const unzip = require('unzip2');
const stream = request.get(SDK_URL).pipe(unzip.Parse()).on('entry', entry => {
console.log(entry.path);
entry.autodrain();
});
stream.on('finish', () => console.log('finished'));
stream.on('error', (err) => console.error(err));
Are you able to confirm that running the above gives you an error? Can I ask what versions of Node/Unzip2/Request that you're using?
Cool library. It works fine with files, but I can't get it to work with requests:
This gives me:
Any ideas?