db: tsx in production-deps + npx-Prefix für seed-Command
Auto-Seed im Container scheiterte mit `ENOENT: tsx prisma/seed.ts`. Zwei Bugs zusammen: 1. `tsx` war devDependency – durch `npm ci --omit=dev` im Runtime weg. 2. `prisma db seed` spawnt den Befehl über System-PATH; node_modules/.bin ist dort nicht enthalten, also war auch das wieder einkopierte tsx nicht auffindbar. Fix: tsx in `dependencies` + Seed-Command auf `npx tsx prisma/seed.ts` (npx löst lokale .bin-Binaries auf, unabhängig vom Aufrufer-PATH). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
"description": "OpenCRM Backend API",
|
||||
"main": "dist/index.js",
|
||||
"prisma": {
|
||||
"seed": "tsx prisma/seed.ts"
|
||||
"seed": "npx tsx prisma/seed.ts"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "tsx watch src/index.ts",
|
||||
@@ -39,6 +39,7 @@
|
||||
"nodemailer": "^7.0.13",
|
||||
"pdf-lib": "^1.17.1",
|
||||
"pdfkit": "^0.17.2",
|
||||
"tsx": "^4.19.2",
|
||||
"undici": "^6.23.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
@@ -55,7 +56,6 @@
|
||||
"@types/nodemailer": "^7.0.9",
|
||||
"@types/pdfkit": "^0.17.4",
|
||||
"prisma": "^5.22.0",
|
||||
"tsx": "^4.19.2",
|
||||
"typescript": "^5.6.3"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user