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

unzip.Parse() doesn't work according to docs #87

Open
jameslaneconkling opened this issue Oct 16, 2015 · 2 comments
Open

unzip.Parse() doesn't work according to docs #87

jameslaneconkling opened this issue Oct 16, 2015 · 2 comments

Comments

@jameslaneconkling
Copy link

It seems that in node v4.1.0, unzip.Parse() does not work according to the docs.

This does not work:

res
  .pipe(unzip.Parse())
  .pipe(writeStream)
  .on('finish', () => {
    console.log('finish')
  });

However, this does:

res
  .pipe(unzip.Parse())
  .on('entry', (entry) => entry.pipe(writeStream) )
  .on('finish', () => {
    console.log('finish')
  })

Maybe the Stream API has changed?

@pgol2
Copy link

pgol2 commented Mar 20, 2016

Any update on this ? Because I have the same problem

@erhhung
Copy link

erhhung commented Aug 18, 2016

I'm using Node 6.3 and have no issues. I don't get a finish event, however, but a close event.

Are you sure you're using writeStream = fstream.Writer('output/path') from the fstream package as shown in the example? The writeStream object in entry.pipe(writeStream), on the other hand, is your standard fs.createWriteStream('output/path').

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