Ensure shared schema is compiled for production deployment
continuous-integration/drone/push Build is passing

Update Dockerfile and build process to compile shared/schema.ts using esbuild and copy the resulting schema.js to the production image.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: ceced2fc-aa46-458d-ba87-ddd4b7bb1518
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/659922a9-0087-461c-90dd-6d9a58b81d4d/ceced2fc-aa46-458d-ba87-ddd4b7bb1518/SBF5OKZ
This commit is contained in:
paul-nothaft
2025-10-23 15:47:27 +00:00
parent 6ff53e071a
commit d6d23e74e1
3 changed files with 59 additions and 5 deletions
+12
View File
@@ -31,6 +31,18 @@ Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/app/dist/routes' imported fro
- `server/db.ts`
- ✅ Changed `@shared/schema` imports to `../shared/schema.js`
### Issue 3: Shared Schema Not Compiled ❌
```
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/app/shared/schema.js' imported from /app/dist/routes.js
```
**Cause**: The `shared/schema.ts` TypeScript file wasn't being compiled to JavaScript.
**Fix**:
- ✅ Added esbuild compilation for `shared/schema.ts`
- ✅ Copy only the compiled `schema.js` file to production
- ✅ All TypeScript files are now properly compiled
## Deployment Steps
### 1. Commit and Push Your Code