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

196
Views
tar file extraction nodejs npm

I am trying to extract a tar file, that I will receive from the web-browser client onto a SUSE server. I have installed tar.gz npm for doing my stuff. But it always throws the same error. Below is the function.

function extract(){
    var name = "C:\\MyDrive\\parsing\\1.zip";
    targz().extract(name, 'C:\\MyDrive', function(err){
    if(err)
        console.log('Something is wrong ', err.stack);
    console.log('Job done!');
    });
}

Below is the error.

\root\server>node test.js
Something is wrong  Error: incorrect header check
    at Zlib._handle.onerror (zlib.js:370:17)
Job done!

Well this error is coming even in Windows also. When I create a tar file in windows and extract the same tar file in windows with the same function above. I believe either I am not using the npm currectly.

Is their any other npm and a working sample code for the same, which can extract the tar file uploaded by client. Extraction need to be achieved through some nodejs npm in javascript.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

There are few many modules for zipping and unzipping in node.js here this could be helpful - unzip

fs.createReadStream(name).pipe(unzip.Extract({ path: '/home/outputpath' }));
over 4 years ago · Santiago Trujillo Report
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!