Skip to content

Commit b38bea4

Browse files
Fix Render deployment TypeScript build errors
**Problem**: Render builds failed because TypeScript dependencies were in devDependencies, which aren't installed in NODE_ENV=production builds. **Solutions**: - Move TypeScript and @types/* packages to dependencies for production builds - Update tsconfig.json to only include production source files (exclude test files) - Ensures clean production builds without test/vitest dependencies **Fixed errors**: - Cannot find module 'vitest' - Could not find declaration files for express, cors, body-parser - Implicit 'any' type errors 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 1b16b54 commit b38bea4

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

backend/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,19 @@
1717
"body-parser": "^1.20.2",
1818
"cors": "^2.8.5",
1919
"dotenv": "^16.3.1",
20-
"express": "^4.18.2"
21-
},
22-
"devDependencies": {
20+
"express": "^4.18.2",
2321
"@types/body-parser": "^1.19.2",
2422
"@types/cors": "^2.8.13",
2523
"@types/express": "^4.17.17",
2624
"@types/node": "^20.19.13",
25+
"typescript": "^4.9.5"
26+
},
27+
"devDependencies": {
2728
"@types/supertest": "^6.0.3",
2829
"@vitest/ui": "^3.2.4",
2930
"nodemon": "^3.0.2",
3031
"supertest": "^7.1.4",
3132
"ts-node": "^10.9.0",
32-
"typescript": "^4.9.5",
3333
"vitest": "^3.2.4"
3434
}
3535
}

backend/tsconfig.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515
"sourceMap": true
1616
},
1717
"include": [
18-
"*.ts"
18+
"server.ts",
19+
"stage.ts",
20+
"atxp-utils.ts"
1921
],
2022
"exclude": [
2123
"node_modules",

0 commit comments

Comments
 (0)