The build failed because a configuration object was exported
01 // OBSERVED SYMPTOM
The application ran in development, but every deploy failed at build time on the authentication route, with no runtime error to inspect.
02 // ROOT CAUSE DIAGNOSIS
A route handler file may export the HTTP verb handlers and a short list of recognised configuration values, and nothing else. The catch-all authentication handler also exported its options object from that file so other server code could import it, and the framework rejected the unrecognised export at build time.
03 // ARCHITECTURAL FIX
The options object moved into a plain library module and the route file was reduced to the two handler exports the framework permits. Two earlier attempts, removing the export and swapping the whole library, had moved the problem rather than solving it.




