Fix npm run build TypeScript Compilation Errors - How to Handle Non-Fast-Forward Upstream-Nginx 502 Bad Gateway: Connection Refused to localhost

Result check
- Keep one change per test run so you know which step helped.
- Undo temporary changes after the issue is confirmed.