fix: add Prisma client to web app for Vercel monorepo compatibility

- Add @prisma/client and prisma as direct dependencies
- Add postinstall and build scripts to generate Prisma client
- Points to schema in packages/db
This commit is contained in:
Ajax Davis 2026-01-02 00:37:00 +10:00
parent 4451eddc91
commit 522c198041
4 changed files with 12 additions and 2 deletions

View file

@ -1,6 +1,6 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
import "./.next/dev/types/routes.d.ts";
import "./.next/types/routes.d.ts";
// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.

View file

@ -3,8 +3,9 @@
"version": "0.0.0",
"private": true,
"scripts": {
"postinstall": "prisma generate --schema=../../packages/db/prisma/schema.prisma",
"dev": "npx @react-grab/claude-code@latest && next dev",
"build": "next build",
"build": "prisma generate --schema=../../packages/db/prisma/schema.prisma && next build",
"start": "next start",
"lint": "eslint .",
"type-check": "tsc --noEmit",
@ -15,6 +16,7 @@
},
"dependencies": {
"@ai-sdk/openai": "3.0.1",
"@prisma/client": "^6.19.0",
"@tpmjs/db": "workspace:*",
"@tpmjs/env": "workspace:*",
"@tpmjs/npm-client": "workspace:*",
@ -34,6 +36,7 @@
"next": "^16.0.8",
"next-themes": "^0.4.6",
"openai": "^6.9.1",
"prisma": "^6.19.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react-markdown": "^10.1.0",

1
packages/db/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
.vercel

6
pnpm-lock.yaml generated
View file

@ -226,6 +226,9 @@ importers:
'@ai-sdk/openai':
specifier: 3.0.1
version: 3.0.1(zod@4.1.13)
'@prisma/client':
specifier: ^6.19.0
version: 6.19.0(prisma@6.19.0(typescript@5.9.3))(typescript@5.9.3)
'@tpmjs/db':
specifier: workspace:*
version: link:../../packages/db
@ -283,6 +286,9 @@ importers:
openai:
specifier: ^6.9.1
version: 6.9.1(ws@8.18.3)(zod@4.1.13)
prisma:
specifier: ^6.19.0
version: 6.19.0(typescript@5.9.3)
react:
specifier: ^19.0.0
version: 19.2.0