Fix npm run build TypeScript Compilation Errors - Fix npm run build Failure from Missing Env Variables-Resolve 'fatal: refusing to merge unrelated histories'

Final checklist
- Confirm that the same symptom is gone after a restart or refresh.
- Keep the smallest working change and undo temporary diagnostic settings.