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

Handle case when dist folder does not exist in build script #185

Merged
merged 1 commit into from
May 3, 2022

Conversation

dferber90
Copy link
Contributor

The build script currently fails with Error: ENOENT: no such file or directory, stat './dist' the first time anyone clones this repo and runs npm run build.

This happens because the dist folder does not exist yet, so rmdirSync(DIR, { recursive: true }); can't remove it.

To reproduce:

rm -rf dist
npm run build

This is fixed by ignoring the ENOENT error.

@dferber90 dferber90 requested a review from mrmckeb May 3, 2022 04:31
@mrmckeb
Copy link
Contributor

mrmckeb commented May 3, 2022

Good catch, and great work as always @dferber90!

@mrmckeb mrmckeb merged commit 8696a47 into master May 3, 2022
@dferber90 dferber90 deleted the fix-build-if-dist-dir-does-not-exist branch May 3, 2022 05:18
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

Successfully merging this pull request may close these issues.

2 participants