Can't unzip file generated by node-archiver on OSxHow to append to a file in Node?Express-js can't GET my static files, why?how to fix UNMET DEPENDENCY errors on expressJSnode-archiver: Archive multiple directoriesnode JS client vs serverPermissions issue using node-archiverError building with webpackExpress req.body not WorkingNodeJs API give destination path to product imageNode Archiver 'Headers Error' when unzipping large files (above 4GB)

How to make clear to people I don't want to answer their "Where are you from?" question?

Creating a histogram using custom data

Helping ease my back pain by studying 13 hours everyday , even weekends

What is the origin of Scooby-Doo's name?

What does it mean to not be able to take the derivative of a function multiple times?

Why is oilcloth made with linseed oil?

Methodology: Writing unit tests for another developer

What do they call philosophers in China?

Music theory behind A chord in the key of G

How do I professionally let my manager know I'll quit over an issue?

I found a password with hashcat, but it doesn't work

Hit the Bulls Eye with T in the Center

Can humans ever directly see a few photons at a time? Can a human see a single photon?

How can lift be less than thrust that is less than weight?

How can I bring back a dead main character without cliches?

UK - Working without a contract. I resign and guy wants to sue me

How do I farm creepers for XP without them exploding?

Can the pre-order traversal of two different trees be the same even though they are different?

career in signal processing

Is there a term for the belief that "if it's legal, it's moral"?

Do I have to explain the mechanical superiority of the player-character within the fiction of the game?

Can Ogre clerics use Purify Food and Drink on humanoid characters?

"Correct me if I'm wrong"

Too early in the morning to have SODA?



Can't unzip file generated by node-archiver on OSx


How to append to a file in Node?Express-js can't GET my static files, why?how to fix UNMET DEPENDENCY errors on expressJSnode-archiver: Archive multiple directoriesnode JS client vs serverPermissions issue using node-archiverError building with webpackExpress req.body not WorkingNodeJs API give destination path to product imageNode Archiver 'Headers Error' when unzipping large files (above 4GB)






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








1















I'm generating a compressed file based on JSON data. Currently, when I generate a TAR file, my API works just fine. Here's my code:



app.post('/', (req, res) => );


And here is some sample JSON I pass through:




"title": "Sample Title",
"files": [

"name": "index.html",
"content": "<p>Hello, World!</p>"
,

"name": "README.md",
"content": "# Hello, World!"

]



But, when I change this to generate a ZIP file, I get errors like 21 "Is a directory" or 2 "No such file or directory."



The code I changed is:



 const filename = 'export.zip';
const archive = archiver('zip',
zlib: level: 9 ,
);


I've tried looking at other questions and issues, but haven't had any luck when making store: true or moving finalize() or making forceZip64: true. What can I change to make ZIP files work correctly?










share|improve this question
























  • Not sure how much help this is, but on my environment (Windows 10, build 17763, Node v10.15.1, your code works perfectly well.. I'm testing with Postman, the export.zip file opens as expected.

    – Terry Lennox
    Mar 25 at 9:56






  • 1





    @TerryLennox thank you for letting me know! That is somewhat helpful; lets me know that it's a Mac thing I have to look out for.

    – Cassidy Williams
    Mar 25 at 17:08

















1















I'm generating a compressed file based on JSON data. Currently, when I generate a TAR file, my API works just fine. Here's my code:



app.post('/', (req, res) => );


And here is some sample JSON I pass through:




"title": "Sample Title",
"files": [

"name": "index.html",
"content": "<p>Hello, World!</p>"
,

"name": "README.md",
"content": "# Hello, World!"

]



But, when I change this to generate a ZIP file, I get errors like 21 "Is a directory" or 2 "No such file or directory."



The code I changed is:



 const filename = 'export.zip';
const archive = archiver('zip',
zlib: level: 9 ,
);


I've tried looking at other questions and issues, but haven't had any luck when making store: true or moving finalize() or making forceZip64: true. What can I change to make ZIP files work correctly?










share|improve this question
























  • Not sure how much help this is, but on my environment (Windows 10, build 17763, Node v10.15.1, your code works perfectly well.. I'm testing with Postman, the export.zip file opens as expected.

    – Terry Lennox
    Mar 25 at 9:56






  • 1





    @TerryLennox thank you for letting me know! That is somewhat helpful; lets me know that it's a Mac thing I have to look out for.

    – Cassidy Williams
    Mar 25 at 17:08













1












1








1








I'm generating a compressed file based on JSON data. Currently, when I generate a TAR file, my API works just fine. Here's my code:



app.post('/', (req, res) => );


And here is some sample JSON I pass through:




"title": "Sample Title",
"files": [

"name": "index.html",
"content": "<p>Hello, World!</p>"
,

"name": "README.md",
"content": "# Hello, World!"

]



But, when I change this to generate a ZIP file, I get errors like 21 "Is a directory" or 2 "No such file or directory."



The code I changed is:



 const filename = 'export.zip';
const archive = archiver('zip',
zlib: level: 9 ,
);


I've tried looking at other questions and issues, but haven't had any luck when making store: true or moving finalize() or making forceZip64: true. What can I change to make ZIP files work correctly?










share|improve this question
















I'm generating a compressed file based on JSON data. Currently, when I generate a TAR file, my API works just fine. Here's my code:



app.post('/', (req, res) => );


And here is some sample JSON I pass through:




"title": "Sample Title",
"files": [

"name": "index.html",
"content": "<p>Hello, World!</p>"
,

"name": "README.md",
"content": "# Hello, World!"

]



But, when I change this to generate a ZIP file, I get errors like 21 "Is a directory" or 2 "No such file or directory."



The code I changed is:



 const filename = 'export.zip';
const archive = archiver('zip',
zlib: level: 9 ,
);


I've tried looking at other questions and issues, but haven't had any luck when making store: true or moving finalize() or making forceZip64: true. What can I change to make ZIP files work correctly?







node.js express node-archiver






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 25 at 17:09







Cassidy Williams

















asked Mar 25 at 7:37









Cassidy WilliamsCassidy Williams

1,31222050




1,31222050












  • Not sure how much help this is, but on my environment (Windows 10, build 17763, Node v10.15.1, your code works perfectly well.. I'm testing with Postman, the export.zip file opens as expected.

    – Terry Lennox
    Mar 25 at 9:56






  • 1





    @TerryLennox thank you for letting me know! That is somewhat helpful; lets me know that it's a Mac thing I have to look out for.

    – Cassidy Williams
    Mar 25 at 17:08

















  • Not sure how much help this is, but on my environment (Windows 10, build 17763, Node v10.15.1, your code works perfectly well.. I'm testing with Postman, the export.zip file opens as expected.

    – Terry Lennox
    Mar 25 at 9:56






  • 1





    @TerryLennox thank you for letting me know! That is somewhat helpful; lets me know that it's a Mac thing I have to look out for.

    – Cassidy Williams
    Mar 25 at 17:08
















Not sure how much help this is, but on my environment (Windows 10, build 17763, Node v10.15.1, your code works perfectly well.. I'm testing with Postman, the export.zip file opens as expected.

– Terry Lennox
Mar 25 at 9:56





Not sure how much help this is, but on my environment (Windows 10, build 17763, Node v10.15.1, your code works perfectly well.. I'm testing with Postman, the export.zip file opens as expected.

– Terry Lennox
Mar 25 at 9:56




1




1





@TerryLennox thank you for letting me know! That is somewhat helpful; lets me know that it's a Mac thing I have to look out for.

– Cassidy Williams
Mar 25 at 17:08





@TerryLennox thank you for letting me know! That is somewhat helpful; lets me know that it's a Mac thing I have to look out for.

– Cassidy Williams
Mar 25 at 17:08












1 Answer
1






active

oldest

votes


















0














This did the trick! By creating the output with createWriteStream and then piping the archive to that, we are able to download a zip that works perfectly.



app.post('/', (req, res) => );





share|improve this answer























    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55333125%2fcant-unzip-file-generated-by-node-archiver-on-osx%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    This did the trick! By creating the output with createWriteStream and then piping the archive to that, we are able to download a zip that works perfectly.



    app.post('/', (req, res) => );





    share|improve this answer



























      0














      This did the trick! By creating the output with createWriteStream and then piping the archive to that, we are able to download a zip that works perfectly.



      app.post('/', (req, res) => );





      share|improve this answer

























        0












        0








        0







        This did the trick! By creating the output with createWriteStream and then piping the archive to that, we are able to download a zip that works perfectly.



        app.post('/', (req, res) => );





        share|improve this answer













        This did the trick! By creating the output with createWriteStream and then piping the archive to that, we are able to download a zip that works perfectly.



        app.post('/', (req, res) => );






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 25 at 22:05









        Cassidy WilliamsCassidy Williams

        1,31222050




        1,31222050



























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55333125%2fcant-unzip-file-generated-by-node-archiver-on-osx%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

            용인 삼성생명 블루밍스 목차 통계 역대 감독 선수단 응원단 경기장 같이 보기 외부 링크 둘러보기 메뉴samsungblueminx.comeh선수 명단용인 삼성생명 블루밍스용인 삼성생명 블루밍스ehsamsungblueminx.comeheheheh

            155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해