0

The error message states: 'VercelPostgresError - missing_connection_string: You did not supply a connectionString and no POSTGRES_URL env var was found.' I've already added the connection string to my .env file, but the error persists. What could be causing this, and how can I ensure the environment variable is correctly recognized both locally and on Vercel?"

I added a console log in my database connection code to verify the POSTGRES_URL is being read but it's not working

2
  • This Error in production or development environment? Commented Jan 25 at 9:24
  • Make sure the db connection function is being used in a server function. env variables without the NEXT_PUBLIC prefix are only loaded on the server. Commented Jan 26 at 9:31

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.