A local build needs SESSION_SECRET, and the failure lies about why - #146
Merged
Conversation
CLAUDE.md told you to run `next build` before declaring UI work done and never said how. A bare `npm run build` on this laptop dies with Failed to collect configuration for /api/auth/demo and that route queries `prisma.user`, so the obvious reading is "no `aoz_wohnen` database here, builds are impossible on this machine". Wrong — and believed twice on 2026-09-01, once confidently enough to be reported to George as an environment limitation. The real `[cause]`, further down the same log, is a missing SESSION_SECRET. With it set the build is exit 0, 56 static pages. Records the working command and the two traps stacked underneath it: piping the build hands you tail's exit status so a failure reports success, and an error naming a database-touching route is not evidence about the database. The cost of the wrong belief was skipping the one gate `npm run verify` explicitly does not cover. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Cd183M6472xBgTKWA2is6h
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CLAUDE.md tells you to run
next buildbefore declaring UI work done, and never said how to run it here.A bare
npm run buildon this laptop dies with:That route queries
prisma.user, so the obvious reading is "this machine has noaoz_wohnendatabase — builds are impossible here."That reading is wrong. The real cause is further down the same log:
SESSION_SECRET=local-build-only npm run build # exit 0, 56 static pagesIt was believed twice on 2026-09-01 — once confidently enough that I reported it to George as an environment limitation. The cost of the wrong belief is skipping the one gate
npm run verifyexplicitly does not cover: a'use client'below an import passes lint, typecheck and Jest, and fails only at build.Two traps stacked underneath it
npm run build | tail -25exits with tail's status, so a failed build reports success. This bit twice in one session.[cause].Docs only — no code change.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Cd183M6472xBgTKWA2is6h