Fix: Why was production deployment using localhost:3000 instead o...
Documentation for Sessions
📝 Fix: Why was production deployment using localhost:3000 instead o...
Date: 2026-01-28
Time: 14:24:57 UTC
Session: editor2-72.73
Agent: angular
Confidence: 100%
Status: ✅ Documented
📋 Decision Context
Question:
Why was production deployment using localhost:3000 instead of production APIs?
Task: Not specified
🎯 Decision Made
Chosen:
Missing fileReplacements in project.json production configuration. Fixed gograb-space, docs-angular, and space-admin by adding fileReplacements to swap environment.ts with environment.prod.ts during production builds.
Options Considered:
- Environment variable not set
- Wrong environment file loaded
- Missing fileReplacements in project.json
- Build configuration error
💭 Reasoning
The project.json files for gograb-space, docs-angular, and space-admin were missing the fileReplacements array in their production configuration. This meant that when building with --configuration=production, Angular was still using environment.ts (which has localhost:3000) instead of environment.prod.ts (which has api.gograb.space). This is a critical bug that caused all production deployments to fail to connect to backends.
📁 Files Involved
- No files specified
🔗 Related
- Decision ID:
dev_1769610293771_fbmhpaa - Session: 72
- Workspace: editor2
Auto-generated by MCP Smart Consolidation