concat icon indicating copy to clipboard operation
concat copied to clipboard

Promise resolves before file is finished writing

Open davidrmusti opened this issue 5 years ago • 1 comments

Hi, please change it so that the concat Promise doesn't resolve until the file saving is finished. When I load the combined file after then() is called, it sporadically causes an error because the file is not there yet. This package therefore cannot be used to reliable read the file after concatenation.

Tested on Mac in a Node Webpack build pipeline.

concat( [ part1.js, part2.js' ], combined.js ).then( resolve('While the combined result is available here in variable result, combined.js is not always finished being saved to disk.') )

davidrmusti avatar Dec 04 '20 11:12 davidrmusti

I ran into this problem as well when upgrading to latest nodejs version.

smohadjer avatar Oct 27 '21 10:10 smohadjer