Closed Silic0nS0ldier closed 5 years ago
Thank you for opening this!
When deleting the public
folder you should also delete the .cache
folder. That's what our CLI via gatsby clean
does. You shouldn't have issues when using gatsby clean
.
We're marking this issue as answered and closing it for now but please feel free to reopen this and comment if you would like to continue this discussion. We hope we managed to help and thank you for using Gatsby!
I think it'd be a good idea to display some kind of warning before gatsby starts building that checks if the .cache contents are in fact valid.
Description
When running
gatsby build
after having removedpublic
from an earlier build, the build fails to due an attempted read ofpublic
folder contents.Steps to reproduce
gatsby build
./public
foldergatsby build
Reproduction repo: https://github.com/Silic0nS0ldier/gatsby-bug-17981
Expected result
Build passes
Actual result
Build fails
Environment