I keep on getting this error
I keep on getting this error
Database Error: VercelPostgresError - 'missing_connection_string': You did not supply a 'connectionString' and no 'POSTGRES_URL' env var was found.
this is dispite my project enviroment variables having all of the variables
3 Replies
fair-rose•9mo ago
Hey! do you mind sharing a code sample?
continuing-cyan•9mo ago
try {
const result = await sql
INSERT INTO named_priorities (name, unassigned)
VALUES ('dev', ${items})
ON CONFLICT (name) DO UPDATE
SET unassigned = EXCLUDED.unassigned;
;
setStatusMessage('Data saved successfully!');
setErrorMessage('');
return true;
} catch (error) {
console.error('Error:', error);
setErrorMessage(Database Error: ${error.message});
setStatusMessage('Failed to save data.');
return false;
}
};
That’s the relevant part that makes my error
Deleted my project and going to add some more stuff to it before remaking it, I assume since the problem is weird that I did something wrong during setup
fair-rose•9mo ago
I would migrate to the Neon serverless driver https://neon.tech/guides/vercel-sdk-migration if you're using @vercel/postgres
Neon
Migrate from Vercel Postgres SDK to the Neon serverless driver - Ne...
Learn how to smoothly transition your application from using Vercel Postgres SDK to the Neon serverless driver