Why doesnt make build work anymore?
- User
Why doesnt make build work anymore?
Assistant
Let me take a look.
Assistant
The cause is clear:
web/embed.godoes//go:embed all:placeholder/dist all:dist, but theweb/placeholder/directory doesn't exist in your workspace. Let me check why.Assistant
Found it.
web/embed.goexpects a committed fallback page atweb/placeholder/dist/index.html, but that path was never committed to git —git ls-filesshows nothing there and the tree is clean. Whoever addedembed.goforgot togit add web/placeholder(likely becauseweb/.gitignoreignoresdist, which can also silently swallowplaceholder/distdepending on how it was added).Assistant
Root cause confirmed.
git check-ignore -vshowsweb/.gitignore's baredistpattern matches any directory nameddistunderweb/— includingweb/placeholder/dist. So when the author created the fallback page, git silently swallowed it, and it never made it into the commit that reworkedembed.go(3628f7a8). Anyone cloning fresh gets the failure you're seeing.Two parts to the fix:
1. Scope the ignore to the build output only:
Assistant
2. Restore the committed fallback page. Let me look at the current built
dist/index.htmland the SPA's sourceindex.htmlto write an appropriate static placeholder:Assistant
Build works again. Let me also verify the placeholder path is now trackable by git and that the
pick()logic gets what it expects:Assistant
Fixed. Summary of what happened:
Root cause:
web/embed.goembedsall:placeholder/distas a compile-time fallback for the dashboard SPA, but that directory was never committed.web/.gitignorecontained a baredistpattern, which git treats as "any directory nameddistat any depth" — so it silently swallowedweb/placeholder/dist/when the author created it. Commit3628f7a8reworkedembed.goto require the placeholder, and every fresh clone (or clean workspace) has failed to build since.Fix, two files:
web/.gitignore— changeddistto/dist, anchoring the ignore to the vite build output at the top ofweb/only, soplaceholder/distis no longer shadowed.web/placeholder/dist/index.html— recreated the committed fallback page: a static, dependency-free page telling the user the binary lacks the SPA and to runmake bundle.
make buildsucceeds, andgit check-ignoreconfirms the placeholder is now tracked-eligible.Worth committing soon — anyone else on a fresh clone is hitting the same wall. Want me to commit and open a PR?