Skip to content

Commit e740388

Browse files
committed
Fix TypeScript import and improve build security
- Fix Todo type import in api.ts to use custom Prisma client location - Remove insecure NODE_TLS_REJECT_UNAUTHORIZED=0 setting - Disable Next.js telemetry to reduce build noise - Use proper SSL with PGSSLMODE=require This fixes the build failure: - 'Module "@prisma/client" has no exported member "Todo"' - Removes TLS security warnings - Ensures type imports match the custom Prisma client output location
1 parent d8e902a commit e740388

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

apps/web/buildspec.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,17 @@ phases:
2121

2222
- echo "=== INSTALLING DEPENDENCIES ==="
2323
- export PGSSLMODE=require
24-
- export NODE_TLS_REJECT_UNAUTHORIZED=0
24+
- export NEXT_TELEMETRY_DISABLED=1
2525
- SKIP_ENV_VALIDATION=true /root/.bun/bin/bun install --frozen-lockfile
2626

2727
- echo "=== GENERATING PRISMA CLIENT ==="
2828
- npx prisma generate
2929

30+
- echo "=== TYPE CHECKING ==="
31+
- echo "Running TypeScript type checking..."
32+
- /root/.bun/bin/bun run type-check
33+
- echo "✅ Type checking passed"
34+
3035
- echo "=== RUNNING DATABASE MIGRATIONS ==="
3136
- echo "Running migrations before build..."
3237
- /root/.bun/bin/bun run db:migrate:runtime

apps/web/src/types/api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { Todo as PrismaTodo } from "@prisma/client";
1+
import type { Todo as PrismaTodo } from "../generated/client";
22

33
// Database types
44
export type Todo = PrismaTodo;

0 commit comments

Comments
 (0)