Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

# Unable to set up the vercel environment during deploying the site. #771

Open
jajos12 opened this issue Jun 27, 2024 · 4 comments
Open

Comments

@jajos12
Copy link

jajos12 commented Jun 27, 2024

When I after following every instruction I ran vercel from the cli, I also I have tried from the vercel website but it says that it is having a problem the problem log is as follows :

 Creating an optimized production build ...

✓ Compiled successfully
✓ Linting and checking validity of types
Collecting page data .tl [VercelPostgresError]: VercelPostgresError - 'missing_connection_string': You did not supply a 'connectionString' and no 'POSTGRES_URL' env var was found.
at tf (C:\Users\My\Programming\nextjs-dashboard.next\server\app\seed\route.js:60:5026)
at Object.get (C:\Users\My\Programming\nextjs-dashboard.next\server\app\seed\route.js:60:6072)
at C:\Users\My\Programming\nextjs-dashboard.next\server\app\seed\route.js:1:3990
at t.a (C:\Users\My\Programming\nextjs-dashboard.next\server\webpack-runtime.js:1:866)
at 1507 (C:\Users\My\Programming\nextjs-dashboard.next\server\app\seed\route.js:1:3883)
at t (C:\Users\My\Programming\nextjs-dashboard.next\server\webpack-runtime.js:1:127)
at C:\Users\My\Programming\nextjs-dashboard.next\server\app\seed\route.js:1:1176
at t.a (C:\Users\My\Programming\nextjs-dashboard.next\server\webpack-runtime.js:1:866)
at 2920 (C:\Users\My\Programming\nextjs-dashboard.next\server\app\seed\route.js:1:967)
at t (C:\Users\My\Programming\nextjs-dashboard.next\server\webpack-runtime.js:1:127) {
code: 'missing_connection_string'
}

Build error occurred
Error: Failed to collect page data for /seed
at C:\Users\My\Programming\nextjs-dashboard\node_modules.pnpm\next@15.0.0-rc.0_react-dom@19.0.0-rc-f994737d14-20240522_react@19.0.0-rc-f994737d14-20240522\node_modules\next\dist\build\utils.js:1274:15
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
type: 'Error'
}
Collecting page data . ELIFECYCLE  Command failed with exit code 1.

Screenshot (46)

@guzmanpdro
Copy link

Here's the solution, greetings 👨‍💻

@ZachAlba
Copy link

ZachAlba commented Jun 28, 2024

This can also be resolved by ignoring the failed deployment and skipping ahead to the part where you set up Postgres and your .env file, and then redeploying. At least I believe that's the step that fixed the error for me after some trial and error.

@Kashyap-Pandya
Copy link

Kashyap-Pandya commented Jun 29, 2024

having same issues , will try what @ZachAlba said. nvm didn't saw @guzmanpdro link. that did the trick. thank you

@kaijuh
Copy link

kaijuh commented Jun 30, 2024

I followed the solution as posted by @guzmanpdro which solved the issue of deployment .

After the successful deployment as outline there, these are the steps I followed:

  1. I added the folder with the route.ts file once again (app/seed/route.ts)
  2. I copy pasted this code https://github.com/vercel/next-learn/blob/main/dashboard/starter-example/app/seed/route.ts
  3. run pnpm i @vercel/postgres in your terminal to install the Vercel Postgres SDK
  4. Ensure your local development server is running with pnpm run dev and navigate to localhost:3000/seed in your browser.
  5. When finished, you will see
    a message "Database seeded successfully" in the browser.
Screenshot 2024-06-30 092628 Once completed, you can delete this file.

Here are all the steps above
https://nextjs.org/learn/dashboard-app/setting-up-your-database

I can then run queries and keep following along the tutorial

image

Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
5 participants