Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

302
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda