question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Node.js example contains zipped folder instead of file

See original GitHub issue

For me the node.js compression example on '‘ADM-ZIP-Introduction’ on the wiki produces readable zip but with an empty folder named ‘test.txt’ instead of the ‘test.txt’ file.

I got adm-zip from npm today, it’s package.json says 0.1.8 and this was on windows vista 64bit, my node.js is 0.8.14 x64 and I unzip using good ol’ WinRar.

My code:

var zip = new Zip();
zip.addFile("test.txt", new Buffer("inner content of the file"), "entry comment goes here");    
zip.writeZip(path + '/package.zip');`

Issue Analytics

  • State:closed
  • Created 11 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

9reactions
kryo2kcommented, Mar 23, 2017

+1 still having this issue on 0.4.7

0reactions
mordkacommented, Apr 20, 2016

Same problem with 0.4.7

Read more comments on GitHub >

github_iconTop Results From Across the Web

How To Work With Zip Files in Node.js
First, you'll combine multiple files into a ZIP archive using adm-zip . You'll then list the ZIP archive contents. After that, you'll add...
Read more >
Need to ZIP an entire directory using Node.js
I ended up using archiver lib. Works great. Example var file_system = require('fs'); var archiver = require('archiver'); var output ...
Read more >
Working with Zip Files in Node.js
Zip files are a common format for compressed files and folders. Most developers end up using tarballs instead of zip files.
Read more >
How to Create Zip files with Node.js
Create a new folder and open the command terminal inside it. · Type npm init -y to initialize the project. · Install the...
Read more >
Best methods for unzipping files in Node.js
You can also add folders to your .zip file and add files to the folder using the folder method, which takes the folder's...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found