You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After running gatsby clean && gatsby build the public folder contains no index.html file. Which leads to the project not working when served by a static server (in my case caddy on docker).
Just came across this too, and creating an index.tsx under src/pages did the trick as pointed out by @barbalex . What's funny is that this new index is a dummy page, as gatsby redirects me to my actual index page once the scripts are loaded.
Description
After running
gatsby clean && gatsby build
the public folder contains no index.html file. Which leads to the project not working when served by a static server (in my case caddy on docker).Steps to reproduce
yarn
yarn build
Expected result
There should be an index.html file.
Actual result
There is none.
There is one in the
offline-plugin-app-shell-fallback
folder though.Environment
My best guess
I just converted this project from a create-react-app project. Then I kept the router in the App.js file instead of using the pages folder, because that seemed like a comfortable shortcut to not have to bother with achieving all the routing in pages: https://github.com/barbalex/bb2/blob/60b908670eb751a44f3d78a51f53aaedd625681e/src/App.js#L86-L101
Works fine in dev mode and even when running
gatsby serve
.Probably this is not expected and breaks in the build?
The text was updated successfully, but these errors were encountered: