Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

305
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda