SawyerHood / draw-a-ui

Draw a mockup and generate html for it
https://draw-a-ui.com
MIT License
13.07k stars 1.58k forks source link

VercelPostgresError: VercelPostgresError - 'missing_connection_string' #65

Open kornpow opened 7 months ago

kornpow commented 7 months ago

Running into this issue after drawing something and after pressing the "make real" button.

⨯ node_modules/@vercel/postgres/dist/chunk-VGUHM5WG.js (158:10) @ createPool ⨯ VercelPostgresError: VercelPostgresError - 'missing_connection_string': You did not supply a 'connectionString' and no 'POSTGRES_URL' env var was found. at uploadLink (./app/lib/uploadLink.tsx:22:60)

Damilare1 commented 7 months ago

I was able to fix this by creating a project and database on vercel. Follow the instructions here and run the command to get the database working on your local instance.

kornpow commented 7 months ago

I did this and it started to work:

docker pull postgres
docker run --name postgres-db -e POSTGRES_PASSWORD=make-real -p 5432:5432 -d postgres
export POSTGRES_URL=postgresql://postgres:makereal@localhost:5432/postgres
npm i
npm run dev

edit: it seems to just work regardless now... with or without postgres running