Fix Prisma backend setup for production build
This commit is contained in:
2
backend/package-lock.json
generated
2
backend/package-lock.json
generated
@ -12,7 +12,7 @@
|
||||
"@nestjs/core": "^10.0.0",
|
||||
"@nestjs/jwt": "^10.2.0",
|
||||
"@nestjs/platform-express": "^10.0.0",
|
||||
"@prisma/client": "^5.0.0",
|
||||
"@prisma/client": "^5.22.0",
|
||||
"bcryptjs": "^2.4.3",
|
||||
"bullmq": "^5.76.6",
|
||||
"class-transformer": "^0.5.1",
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
"@nestjs/core": "^10.0.0",
|
||||
"@nestjs/jwt": "^10.2.0",
|
||||
"@nestjs/platform-express": "^10.0.0",
|
||||
"@prisma/client": "^5.0.0",
|
||||
"@prisma/client": "^5.22.0",
|
||||
"bcryptjs": "^2.4.3",
|
||||
"bullmq": "^5.76.6",
|
||||
"class-transformer": "^0.5.1",
|
||||
|
||||
@ -89,14 +89,19 @@ cd /srv/bizone-web
|
||||
npm install
|
||||
```
|
||||
|
||||
Jangan lewati langkah root ini. Script `backend/npm run db:generate` mengambil Prisma client hasil generate dari root repo.
|
||||
|
||||
Backend:
|
||||
|
||||
```bash
|
||||
cd /srv/bizone-web/backend
|
||||
npm install
|
||||
npm run db:generate
|
||||
npm run build
|
||||
```
|
||||
|
||||
Jika Anda langsung menjalankan `npm run build` tanpa `npm run db:generate`, TypeScript biasanya gagal dengan error seperti `Prisma.sql does not exist`, `Prisma.InputJsonValue`, atau model Prisma tidak ditemukan.
|
||||
|
||||
Frontend:
|
||||
|
||||
```bash
|
||||
@ -174,7 +179,7 @@ npm run seed:admin
|
||||
|
||||
Seed default saat ini:
|
||||
|
||||
- Email: `admin@example.com`
|
||||
- Email: `admin@bizone.id`
|
||||
- Password: `ChangeMe123!`
|
||||
|
||||
Masuk lalu segera ganti password.
|
||||
|
||||
Reference in New Issue
Block a user