CognxSafeTrack commited on
Commit ·
f04a1e3
1
Parent(s): ca816a7
fix(deployment): resolve ESM module not found by decoupling seed from database index
Browse files
apps/api/src/scripts/sync-content.ts
CHANGED
|
@@ -3,7 +3,9 @@ import dotenv from 'dotenv';
|
|
| 3 |
// Load root .env
|
| 4 |
dotenv.config({ path: path.resolve(__dirname, '../../../../.env') });
|
| 5 |
|
| 6 |
-
import { PrismaClient
|
|
|
|
|
|
|
| 7 |
|
| 8 |
const prisma = new PrismaClient();
|
| 9 |
|
|
|
|
| 3 |
// Load root .env
|
| 4 |
dotenv.config({ path: path.resolve(__dirname, '../../../../.env') });
|
| 5 |
|
| 6 |
+
import { PrismaClient } from '@repo/database';
|
| 7 |
+
// @ts-ignore
|
| 8 |
+
import { seedDatabase } from '@repo/database/seed';
|
| 9 |
|
| 10 |
const prisma = new PrismaClient();
|
| 11 |
|
packages/database/index.ts
CHANGED
|
@@ -1,2 +1 @@
|
|
| 1 |
export * from '@prisma/client';
|
| 2 |
-
export * from './src/seed';
|
|
|
|
| 1 |
export * from '@prisma/client';
|
|
|