Spaces:
Build error
Build error
Gmagl commited on
Commit ·
6d50388
1
Parent(s): 622720b
Fix: Add prisma export and tw-animate-css dependency
Browse files- package.json +1 -0
- src/lib/db.ts +4 -10
package.json
CHANGED
|
@@ -41,6 +41,7 @@
|
|
| 41 |
"react-hook-form": "^7.60.0",
|
| 42 |
"sonner": "^2.0.6",
|
| 43 |
"tailwind-merge": "^3.3.1",
|
|
|
|
| 44 |
"z-ai-web-dev-sdk": "^0.0.16",
|
| 45 |
"zod": "^4.0.2"
|
| 46 |
},
|
|
|
|
| 41 |
"react-hook-form": "^7.60.0",
|
| 42 |
"sonner": "^2.0.6",
|
| 43 |
"tailwind-merge": "^3.3.1",
|
| 44 |
+
"tw-animate-css": "^1.3.5",
|
| 45 |
"z-ai-web-dev-sdk": "^0.0.16",
|
| 46 |
"zod": "^4.0.2"
|
| 47 |
},
|
src/lib/db.ts
CHANGED
|
@@ -1,13 +1,7 @@
|
|
| 1 |
-
import { PrismaClient } from '@prisma/client'
|
| 2 |
|
| 3 |
-
const globalForPrisma =
|
| 4 |
-
prisma: PrismaClient | undefined
|
| 5 |
-
}
|
| 6 |
|
| 7 |
-
export const
|
| 8 |
-
globalForPrisma.prisma ??
|
| 9 |
-
new PrismaClient({
|
| 10 |
-
log: ['query'],
|
| 11 |
-
})
|
| 12 |
|
| 13 |
-
if (process.env.NODE_ENV !== 'production') globalForPrisma.prisma =
|
|
|
|
| 1 |
+
import {{ PrismaClient }} from '@prisma/client';
|
| 2 |
|
| 3 |
+
const globalForPrisma = global as unknown as {{ prisma: PrismaClient }};
|
|
|
|
|
|
|
| 4 |
|
| 5 |
+
export const prisma = globalForPrisma.prisma || new PrismaClient();
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
|
| 7 |
+
if (process.env.NODE_ENV !== 'production') globalForPrisma.prisma = prisma;
|