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

Don't use callbacks with *Sync fs methods #13

Open
humphd opened this issue Sep 22, 2021 · 3 comments
Open

Don't use callbacks with *Sync fs methods #13

humphd opened this issue Sep 22, 2021 · 3 comments
Labels

Comments

@humphd
Copy link

humphd commented Sep 22, 2021

In a few places you are calling *Sync versions of fs methods, for example: here and here. You only use a callback when you use the async versions of these methods.

@sirinoks
Copy link
Owner

I actually had a bug when I used async. It would not read the file in time and won't generate the output as a result

@humphd
Copy link
Author

humphd commented Sep 23, 2021

If you show me some code, I can help you fix it.

@sirinoks
Copy link
Owner

Well, it's literally half of the times (especially consistent after there were index.js file changes and not output), there would be no generated files, because texts would be empty.
It might be the case tho I don't need write file sync. I'll remove that one and see what happens.

@sirinoks sirinoks added the TODO label Oct 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants