next-learn icon indicating copy to clipboard operation
next-learn copied to clipboard

Unable to seed the data due to connection error

Open gaurav-iitg opened this issue 1 year ago • 12 comments

Getting error while using the seed command Please tell if someone has any idea of what's happening... image

gaurav-iitg avatar Mar 09 '24 05:03 gaurav-iitg

I am using Node.js v20.11.1

gaurav-iitg avatar Mar 09 '24 05:03 gaurav-iitg

@gauravkumar5089 Did you find the solution?

Joeychinedu avatar Mar 19 '24 17:03 Joeychinedu

I also have the same error...Can someone help please?

FlyntDenzel avatar Mar 22 '24 09:03 FlyntDenzel

I also have the same error...Can someone help please?

I don't exactly how it worked out but i tried to remove the database and again add the environment variables two - three times. That worked for me. Hope it also works for you

gaurav-iitg avatar Mar 22 '24 10:03 gaurav-iitg

I also have the same error...Can someone help please?

I don't exactly how it worked out but i tried to remove the database and again add the environment variables two - three times. That worked for me. Hope it also works for you

I found the error. I had to remove the "." from the ".seed" command found in the package.json file

FlyntDenzel avatar Mar 22 '24 19:03 FlyntDenzel

there is nothing .seed in package.json

prats24 avatar Mar 25 '24 00:03 prats24

Anyone found solution to this problem?

prats24 avatar Mar 25 '24 00:03 prats24

try running vercel dev instead of npm run dev

that did the magic for me https://github.com/orgs/vercel/discussions/2350#discussioncomment-5850746

vignxs avatar Mar 30 '24 09:03 vignxs

I was able to get through this issue by nvm use 18.17.1 and made sure .env was correctly configured. It took me more than 8 hours 😂️.

Suitec9 avatar Apr 11 '24 15:04 Suitec9

nvm use 18 worked for me too

ianMuchesia avatar Apr 29 '24 11:04 ianMuchesia

Worked for me thnx @Suitec9 and @ianMuchesia

sojinsamuel avatar May 08 '24 07:05 sojinsamuel

my ndoe version is v20.12.2 and have the same issue. So i changed the seed script to 'bun -r dotenv/config ./scripts/seed.js', and it works now.

bclovecoding avatar May 25 '24 08:05 bclovecoding