fix: lazy-load Prisma client to fix build-time URL parsing

- Make Prisma client initialization lazy via Proxy
- Defer database-pool import until runtime
- Add guard for empty DATABASE_URL
- Build now succeeds with Next.js 16.1.4
This commit is contained in:
2026-01-20 07:34:30 +01:00
parent 5bfd762e55
commit 7932fe7386
6 changed files with 91 additions and 177 deletions

View File

@@ -5,14 +5,20 @@
"forceConsistentCasingInFileNames": true,
"incremental": true,
"isolatedModules": true,
"jsx": "preserve",
"lib": ["dom", "dom.iterable", "ES2024"],
"jsx": "react-jsx",
"lib": [
"dom",
"dom.iterable",
"ES2024"
],
"module": "ESNext",
"moduleResolution": "bundler",
"noEmit": true,
"noImplicitAny": false,
"paths": {
"@/*": ["./*"]
"@/*": [
"./*"
]
},
"plugins": [
{
@@ -25,12 +31,16 @@
"strictNullChecks": true,
"target": "ES2024"
},
"exclude": ["node_modules", "tests"],
"exclude": [
"node_modules",
"tests"
],
"include": [
"next-env.d.ts",
"types/**/*.d.ts",
"**/*.ts",
"**/*.tsx",
".next/types/**/*.ts"
".next/types/**/*.ts",
".next/dev/types/**/*.ts"
]
}