Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Promise resolves before file is finished writing #9

Open
davidrmusti opened this issue Dec 4, 2020 · 1 comment
Open

Promise resolves before file is finished writing #9

davidrmusti opened this issue Dec 4, 2020 · 1 comment

Comments

@davidrmusti
Copy link

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.') )

@smohadjer
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants