Next.js Discord

Discord Forum

stuck on seeding database in tutorial

Unanswered
Beveren posted this in #help-forum
Open in Discord
BeverenOP
So I am on this step:
https://nextjs.org/learn/dashboard-app/setting-up-your-database#executing-queries
and I created a supabase postgre database

I replaced the first set of lines in .env with the secrets available on my Vercel page, although it didn't give me the AUTH_SECRET so I left that alone. It didn't tell me to populate it (I did eventually populate it with troubleshooting by running "npx auth secret" but it didn't change anything.

I then went to http://localhost:3000/seed as the instructions told me and my browser tab just says loading, I don't get any page saying they successfully seeded, it's just blank... but then I go to my supabase and I see customers, invoices, revenue, and users tables each with content in them. So maybe it worked even though I didn't get the message on the page?

I'm now trying to run the query
https://nextjs.org/learn/dashboard-app/setting-up-your-database#executing-queries

I assume it wants me to change this file: app\query\route.ts

But it's not clear what I uncomment, I tried uncommenting it all but my screen just says:

{"message":"Uncomment this file and remove this line. You can delete this file when you are finished."}
I don't know what I am doing wrong here. I went through all this 6 months ago and figured I did something wrong but I'm still getting the same issue.

I also ran the query here:
https://nextjs.org/learn/dashboard-app/setting-up-your-database#executing-queries
and didn't get any results, so I don't think it seeded correctly. I also tried to switch to bcryptjs to no avail

Anyone have any ideas? Is there a better place to ask this?

7 Replies

Asiatic Lion
@Beveren did you get this fixed ?
BeverenOP
Thanks for asking! I did google the question in a better way and found the code to fix it, but it’s honestly pretty gross that the tutorial is broken months later. I’m really hoping they fix it.
I should add, I haven’t finished the tutorial so I don’t know if it truly fixed it.
Hoping to finish it by tomorrow.
Asiatic Lion
Thanks for the response. I’m stucked at the setting up database while doing the tutorial.
BeverenOP
Hopefully we can all complain louder and they will fix it. I get if this was some system with a dozen users but this has to have tens of thousands of people using it, it’s pretty bonkers. Maybe they want people to know how to research….
Asiatic Lion
I got it fixed today mate. @Beveren