Nutlope / roomGPT

Upload a photo of your room to generate your dream room with AI.
https://www.roomgpt.io/
MIT License
9.87k stars 1.31k forks source link

one click depoly to Vercel got below error #56

Closed mmtechhk closed 1 year ago

mmtechhk commented 1 year ago
Error: Prisma schema validation - (get-config wasm) -- 17:06:24.216 | Error code: P1012 17:06:24.216 | error: Environment variable not found: DIRECT_DATABASE_URL. 17:06:24.216 | --> schema.prisma:4 17:06:24.216 | \| 17:06:24.216 | 3 \| url = env("DATABASE_URL") 17:06:24.216 | 4 \| directUrl = env("DIRECT_DATABASE_URL") 17:06:24.216 | \| 17:06:24.216 |   17:06:24.217 | Validation Error Count: 1 17:06:24.217 | [Context: getConfig] 17:06:24.217 |   17:06:24.218 | Prisma CLI Version : 4.11.0 17:06:24.257 | Error: Command "npm run build" exited with 1 17:06:24.687 | BUILD_UTILS_SPAWN_1: Command "npm run build" exited with 1
shafty023 commented 1 year ago

I am getting the same error

Tombcn71 commented 1 year ago

I had the same I found the solution on this page. https://neon.tech/docs/guides/prisma these settings are defined in our prisma file but not yet in de .env file.

update your .env file with both the DATABASE_URL and DIRECT_URL variables settings. As shown in the following example, set DATABASE_URL to the pooled connection string for your Neon database, and set DIRECT_URL to the non-pooled connection string.

DATABASE_URL="postgres://casey:@ep-square-sea-260584-pooler.us-east-2.aws.neon.tech:5432/neondb?pgbouncer=true" DIRECT_URL="postgres://casey:@ep-square-sea-260584.us-east-2.aws.neon.tech:5432/neondb"

mmtechhk commented 1 year ago

Thanks. After I added this 2. I fixed

image

iShelar commented 1 year ago

@Tombcn71 What would be the shadow DB URL?