-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Chapter 6: Setting up your database - Error [object Object] #833
Comments
Well, it looks like somebody else had the same error that i miss, and it works if you run /seed on your deployed environment, not local like the instructions have: #792 However, I am not sure if this is the way Vercel does want you to do this or if they just have not updated the tutorial. |
I get the exact same error. This is my fourth rerun of the project tutorial 😓 |
I hear you. I just got it working, saw the data, and now Vercel errors saying "Failed to fetch tables in your database" and the data is gone :/ |
Does the error say: 'error fetching card data' and shows that the error is in the fetchInvoices method? |
I figured something out. It worked finally. Finally, run pnpm i @vercel/postgres in your terminal to install the Vercel Postgres SDK In my other attempts, when I checked my package.json file for dependancies, I always thought there was no need to install the vercel/postgres sdk because I thought it was already installed, but turns out you need to install the sdk. Hope this helps 😁👍 |
@SiyabongaMat Hey, glad to hear that you resolved issue on your own. I think it should be removed. |
Hi, I was wondering if you ended up successfully seeding locally?I'm having this problem: I can successfully seed an application that I deployed on vercel, but it keeps failing to seed locally, maybe vercel doesn't support local connections to vercel/postgres? |
@KinonoChen Instead of using @vercel/postgres, I used the node-postgres package and rewrote the seed file to use its syntax. The changes were fairly minimal. This allowed me to connect to a Postgres database running on my machine in Docker for testing. Hope this helps. |
The issue as far as I can tell is that the Washington default server causes a latency that lags out the request. If you are using the "@vercel/postgres" package to connect to their cloud database, it might work better if you delete the database, re-create the database, and select a server close to your geographic location. One of the ways I confirmed this was the issue:
Without looking into the specific code that is a part of the Vercel postgres package, I am going to assume that the request is timing out (read: unresolved promise) due to geographic location. This issue should be fixed if someone from Vercel ever has 20 minutes to fix this. |
Hi, I am on my second round of doing this next.js tutorial from scratch in an attempt to seed the postgres database correctly, but I just cannot figure out why I am non de-script errors (Error: [object Object]), even when on my first try I tried to log everything on my first go around. Please help!
I am pasting a screenshot of my browser errors and linking my current repo if anyone is willing to take a look. I read many other posts on chapter 6 errors, correctly commented out my route.ts ("uncomment this file..."), compared with a friend who got it working (but, looks like his route.ts file was different from a few months ago), see no logs anywhere in Vercel, etc. I confirm I correctly pasted over the env variables into my .env file. I got an error trying to install bcryptjs to see if that was somehow the error that Vercel recommends to check. Let me know if there is anything I can try, I am very confused.
Repo: https://github.com/pyMasta/nextjs-v3
The text was updated successfully, but these errors were encountered: