The root cause was incorrect adapter usage:
- PrismaBetterSqlite3 is a FACTORY that expects {url: string} config
- We were incorrectly passing a Database instance directly
- This caused "Cannot read properties of undefined (reading 'replace')" error
Changes:
1. Fixed Next.js prisma.ts to pass {url} config to adapter factory
2. Fixed DBAL context.ts to use adapter factory with URL
3. Removed direct Database instantiation - let adapter handle it
4. Created absolute-path .env file with DATABASE_URL
5. Cleaned and reinstalled all dependencies to ensure version alignment
6. Added missing database columns (tenantId, config to InstalledPackage)
Result: Database operations now work! Application serves pages successfully.
Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
- Fixed Storybook dependency version mismatch (downgraded to 8.6.15)
- Added @types/better-sqlite3 for better-sqlite3 type definitions
- Fixed Prisma adapter import (PrismaBetterSqlite3 vs PrismaBetterSQLite3)
- Removed datasource URL from Prisma schema (Prisma 7 requirement)
- Generated DBAL types.generated.ts from Prisma schema
- Added index signatures to Update*Input types for Record<string, unknown> compatibility
- Fixed ErrorBoundary override modifiers
- Fixed Zod record schema (requires both key and value types)
- Fixed orderBy syntax in get-error-logs (array format)
- Fixed type safety in API routes (user type assertions)
- Fixed hook imports and exports
- Fixed conditional expression type guards
- Added .npmrc for legacy peer deps support
Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
- Updated functions.json files in theme_editor, ui_auth, ui_footer, ui_header, ui_home, ui_intro, ui_level2, ui_level3, ui_level4, ui_level5, ui_level6, ui_login, ui_pages, ui_permissions, user_manager, and workflow_editor packages.
- Removed luaScript entries from function definitions, retaining only category and other relevant metadata.
- Adjusted documentation in prisma/README.md to remove LuaScript entity reference.
- Fix import path from 'prisma/config' to '@prisma/config' in prisma.config.ts
- Add proper output path to generator in schema.prisma for monorepo structure
- Make dotenv import optional with try/catch for CI environments
- Prisma client now generates successfully in frontends/nextjs/node_modules/.prisma/client
Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
- Updated Prisma from 6.19.1 to 7.2.0 (major version)
- Migrated Prisma schema to remove datasource URL (Prisma 7.x requirement)
- Updated PrismaClient initialization to pass datasourceUrl
- Fixed API route handlers to accept NextRequest parameter
- Updated MUI Grid component to include component prop for v7 compatibility
- Added AWS SDK dependencies to DBAL development module
- Created stub implementations for GitHub workflow log analysis functions
Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>