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

Stop process from crashing if folder doesn't exist #138

Open
TheColorRed opened this issue Feb 14, 2018 · 0 comments
Open

Stop process from crashing if folder doesn't exist #138

TheColorRed opened this issue Feb 14, 2018 · 0 comments

Comments

@TheColorRed
Copy link

I am running the following command (split into multiple lines for readability):

watch 
"uglifyjs --compress --mangle --output ./lib/hp.min.js -- ./lib/hp.js" 
./lib/ --interval=1 --wait=5

When I build my project for the first time or just delete the lib directory completely and restart the process, I get an error that the directory doesn't exist which is true. It also crashes the process requiring it to have to be ran a second time.

Error: ENOENT: no such file or directory, stat 'C:...\lib'

Is there a way to either delay watching of the directory for x seconds or just wait until the directory is created?

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

1 participant