-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
I'm running into a problem after creating a vercel postgres db and connecting it to my project.
I changed .env.example into .env and copy pasted the .env.local secrets.
I also ran the "vercel env pull .env.development.local" and "npm install @vercel/postgres" commands as per vercels instructions. Then I run into the following problem of seeding the database with the "npm run seed" command:
npm run seed
seed
node -r dotenv/config ./nextjs-dashboard/scripts/seed.js
An error occurred while attempting to seed the database: VercelPostgresError: VercelPostgresError - 'missing_connection_string': You did not supply a 'connectionString' and no 'POSTGRES_URL' env var was found.
at createPool (/Users/andor/Desktop/next_course_app/nextjs-dashboard/node_modules/@vercel/postgres/dist/chunk-PKSWROYW.cjs:158:11)
at Object.get (/Users/andor/Desktop/next_course_app/nextjs-dashboard/node_modules/@vercel/postgres/dist/chunk-PKSWROYW.cjs:201:16)
at main (/Users/andor/Desktop/next_course_app/nextjs-dashboard/scripts/seed.js:164:27)
at Object. (/Users/andor/Desktop/next_course_app/nextjs-dashboard/scripts/seed.js:174:1)
at Module._compile (node:internal/modules/cjs/loader:1267:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1321:10)
at Module.load (node:internal/modules/cjs/loader:1125:32)
at Module._load (node:internal/modules/cjs/loader:965:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12)
at node:internal/main/run_main_module:23:47 {
code: 'missing_connection_string'
}
Can anyone help please? I would like to proceed with the course, but I'm stuck at this part.