Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

304
Views
Issues unzipping file in Nodejs via a child process, it gives me an error, however when I run the exact command in the child process it works

I have a script up at the moment that downloads a zip file from a permalink, unzips it, delete the old version of the file, and then renames the newly unzipped directory.

exec("unzip recentDatabase.zip", (error, stdout, stderr) => {
    if(error){
      ...
    }
    if (stderr) {
      ...
    }
    ... 
    exec("rm -r recentDatabase ; mv " + DBname + " recentDatabase");
  })

for some reason I get the error : " End-of-central-directory signature not found. Either this file is not a zipfile, or it constitutes one disk of a multi-part archive. In the latter case the central directory and zipfile comment will be found on the last disk(s) of this archive."

I have made a callback statement with this to make sure that this unzip command only runs when it confirms that the http download is finished, and when I run 'unzip recentDatabase.zip' in the terminal it works perfectly fine, it only has issues when I call it from a child process.

Is there something that im doing wrong?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!