I have a zip folder that contain a html file. I want to extract the zip in a directory then read the content of the html. In this code i can extract the zip folder but when i want read the content of the extracted file i found this error 'No such file or directory...' eve the file exist in the write path but i think that my code read the content of the html before the extraction.How can i fix this please.
var unzip = require('unzip');
var stream = fs.createReadStream(zipFilePath).pipe(unzip.Extract({ path: outputPath }));
stream.on('finish',function({console.log('done')});
console.log(fs.readFileSync('outputPath'+'/'+htmlFile).toString());