R
Railway9mo ago
devour

Turborepo/Express Issues

Hello, I'm having issues deploying my Express application. NOTE: I have double checked that a completely new environment locally builds and runs without issues. The build goes through fine and runs my custom build command, these are commands I tried: - turbo run build --filter=api... && pnpm --filter db migrate - pnpm install --filter api && turbo run build --filter=api... && pnpm --filter db migrate - turbo run build --filter=api... && pnpm install --filter api && pnpm --filter db migrate The problem occurs when the app is supposed to start. The error I'm getting is in IMG1. You can also see that this specific package was built in IMG2.
// package.json
{
"name": "fireweed",
"private": true,
"scripts": {
"build": "turbo build",
"dev": "turbo dev",
"lint": "turbo lint",
"clean": "turbo run clean",
"format": "prettier --write \"**/*.{ts,tsx,md}\""
},
"devDependencies": {
"@fireweed/eslint-config": "workspace:*",
"@fireweed/typescript-config": "workspace:*",
"prettier": "^3.1.1",
"turbo": "^1.11.3"
},
"packageManager": "[email protected]",
"engines": {
"node": "20.x"
}
}
// package.json
{
"name": "fireweed",
"private": true,
"scripts": {
"build": "turbo build",
"dev": "turbo dev",
"lint": "turbo lint",
"clean": "turbo run clean",
"format": "prettier --write \"**/*.{ts,tsx,md}\""
},
"devDependencies": {
"@fireweed/eslint-config": "workspace:*",
"@fireweed/typescript-config": "workspace:*",
"prettier": "^3.1.1",
"turbo": "^1.11.3"
},
"packageManager": "[email protected]",
"engines": {
"node": "20.x"
}
}
// apps/api/package.json
{
"name": "@fireweed/api",
"version": "1.0.0",
"private": true,
"type": "module",
"scripts": {
"build": "tsup src/server.ts --format esm,cjs",
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist",
"dev": "pnpm with-env tsup src/server.ts --format cjs --watch --onSuccess \"node dist/server.js\"",
"lint": "tsc --noEmit && eslint \"src/**/*.ts*\"",
"start": "pnpm with-env node dist/server.js",
"with-env": "dotenv -e ../../.env --",
"test": "NODE_OPTIONS=--experimental-vm-modules jest --detectOpenHandles --verbose --coverage --config jest.config.ts",
"test:ci": "pnpm test --ci"
},
"license": "ISC",
"dependencies": {
"@fireweed/db": "workspace:*",
"@fireweed/emails": "workspace:*",
"@fireweed/env": "workspace:*",
"@fireweed/logger": "workspace:*",
"@fireweed/shared": "workspace:*",
"@fireweed/validators": "workspace:*",
"cookie-parser": "^1.4.6",
"cors": "^2.8.5",
"cross-env": "^7.0.3",
"dotenv": "^16.4.5",
"dotenv-cli": "^7.3.0",
"express": "^4.18.2",
"express-rate-limit": "^7.1.5",
"express-slow-down": "^2.0.1",
"jose": "^5.2.2",
"morgan": "^1.10.0",
"nanoid": "^3.0.0",
"zod": "^3.22.4"
},
"devDependencies": {
"@fireweed/eslint-config": "workspace:*",
"@fireweed/typescript-config": "workspace:*",
"@jest/globals": "^29.7.0",
"@types/cookie-parser": "^1.4.6",
"@types/cors": "^2.8.13",
"@types/express": "^4.17.17",
"@types/jest": "^29.5.12",
"@types/morgan": "^1.9.4",
"@types/node": "^20.4.6",
"eslint": "^8.46.0",
"jest": "^29.7.0",
"supertest": "^6.3.4",
"ts-jest": "^29.1.2",
"ts-node": "^10.9.2",
"tsup": "^8.0.2",
"typescript": "^5.1.6",
"@types/nanoid": "^3.0.0",
"@types/supertest": "^6.0.2"
}
}
// apps/api/package.json
{
"name": "@fireweed/api",
"version": "1.0.0",
"private": true,
"type": "module",
"scripts": {
"build": "tsup src/server.ts --format esm,cjs",
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist",
"dev": "pnpm with-env tsup src/server.ts --format cjs --watch --onSuccess \"node dist/server.js\"",
"lint": "tsc --noEmit && eslint \"src/**/*.ts*\"",
"start": "pnpm with-env node dist/server.js",
"with-env": "dotenv -e ../../.env --",
"test": "NODE_OPTIONS=--experimental-vm-modules jest --detectOpenHandles --verbose --coverage --config jest.config.ts",
"test:ci": "pnpm test --ci"
},
"license": "ISC",
"dependencies": {
"@fireweed/db": "workspace:*",
"@fireweed/emails": "workspace:*",
"@fireweed/env": "workspace:*",
"@fireweed/logger": "workspace:*",
"@fireweed/shared": "workspace:*",
"@fireweed/validators": "workspace:*",
"cookie-parser": "^1.4.6",
"cors": "^2.8.5",
"cross-env": "^7.0.3",
"dotenv": "^16.4.5",
"dotenv-cli": "^7.3.0",
"express": "^4.18.2",
"express-rate-limit": "^7.1.5",
"express-slow-down": "^2.0.1",
"jose": "^5.2.2",
"morgan": "^1.10.0",
"nanoid": "^3.0.0",
"zod": "^3.22.4"
},
"devDependencies": {
"@fireweed/eslint-config": "workspace:*",
"@fireweed/typescript-config": "workspace:*",
"@jest/globals": "^29.7.0",
"@types/cookie-parser": "^1.4.6",
"@types/cors": "^2.8.13",
"@types/express": "^4.17.17",
"@types/jest": "^29.5.12",
"@types/morgan": "^1.9.4",
"@types/node": "^20.4.6",
"eslint": "^8.46.0",
"jest": "^29.7.0",
"supertest": "^6.3.4",
"ts-jest": "^29.1.2",
"ts-node": "^10.9.2",
"tsup": "^8.0.2",
"typescript": "^5.1.6",
"@types/nanoid": "^3.0.0",
"@types/supertest": "^6.0.2"
}
}
// packages/shared/package.json
{
"name": "@fireweed/shared",
"version": "1.0.0",
"main": "./dist/index.js",
"source": "./src/index.ts",
"types": "./dist/index.d.ts",
"type": "module",
"scripts": {
"build": "tsup src/index.ts --format esm,cjs --dts",
"clean": "rm -rf .turbo node_modules dist",
"dev": "tsup --watch"
},
"devDependencies": {
"@fireweed/eslint-config": "workspace:*",
"@fireweed/typescript-config": "workspace:*",
"eslint": "^8.56.0",
"tsup": "^8.0.2",
"typescript": "^5.3.3"
},
"dependencies": {
"@fireweed/db": "workspace:*",
"@fireweed/validators": "workspace:*",
"@types/bcrypt": "^5.0.2",
"bcrypt": "^5.1.1",
"drizzle-zod": "^0.5.1",
"nanoid": "^3.0.0",
"zod": "^3.22.4"
}
}
// packages/shared/package.json
{
"name": "@fireweed/shared",
"version": "1.0.0",
"main": "./dist/index.js",
"source": "./src/index.ts",
"types": "./dist/index.d.ts",
"type": "module",
"scripts": {
"build": "tsup src/index.ts --format esm,cjs --dts",
"clean": "rm -rf .turbo node_modules dist",
"dev": "tsup --watch"
},
"devDependencies": {
"@fireweed/eslint-config": "workspace:*",
"@fireweed/typescript-config": "workspace:*",
"eslint": "^8.56.0",
"tsup": "^8.0.2",
"typescript": "^5.3.3"
},
"dependencies": {
"@fireweed/db": "workspace:*",
"@fireweed/validators": "workspace:*",
"@types/bcrypt": "^5.0.2",
"bcrypt": "^5.1.1",
"drizzle-zod": "^0.5.1",
"nanoid": "^3.0.0",
"zod": "^3.22.4"
}
}
Please let me know if you need more information.
No description
No description
2 Replies
Percy
Percy9mo ago
Project ID: 48848408-a9ee-4094-ba13-e65c1e6a1646
devour
devour9mo ago
48848408-a9ee-4094-ba13-e65c1e6a1646
Want results from more Discord servers?
Add your server