Fix seed.ts module resolution: move to backend/prisma/

ts-node resolved node_modules relative to the script path, so running
from prisma/seed.ts (outside backend/) never found bcryptjs or
@prisma/client in backend/node_modules — the seed silently failed on
every container start. Moving the script under backend/prisma/ fixes
resolution; also adds a missing .gitignore for node_modules.
This commit is contained in:
Giuseppe Lombardo 2026-08-13 07:16:11 +00:00
parent c8a5984f8b
commit d1b2447d92
4 changed files with 2002 additions and 1 deletions

4
.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
node_modules/
dist/
.env
*.log

1997
backend/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -3,7 +3,7 @@
"version": "1.0.0", "version": "1.0.0",
"private": true, "private": true,
"prisma": { "prisma": {
"seed": "ts-node ../prisma/seed.ts" "seed": "ts-node prisma/seed.ts"
}, },
"scripts": { "scripts": {
"dev": "ts-node-dev --respawn -r dotenv/config src/app.ts", "dev": "ts-node-dev --respawn -r dotenv/config src/app.ts",