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

npx prisma db seed is failing #220

Closed
manavkush opened this issue Apr 13, 2024 · 7 comments
Closed

npx prisma db seed is failing #220

manavkush opened this issue Apr 13, 2024 · 7 comments

Comments

@manavkush
Copy link

manavkush commented Apr 13, 2024

Hey, I was setting up the daily-code project and everything worked well till the seeding step.
I've tried checking the seed.ts(what the error is showing), but don't seem to find any problem in that.
Is someone else having similar issue?

Screenshot from 2024-04-13 20-00-57

@kris08052000
Copy link

1.cd daily-code
2.yarn install
3.cd /packages/db
4.cp .env.example .env
5.Update the .env file with the database url
6.yarn prisma migrate dev
7.yarn prisma db seed
8.cd ../..
9.yarn run dev

This could solve your issue. I went in this above steps and it worked well for me.

I don't know why the f!uck this "Module not found" issue occur every time when i i go with NPM, even it occurred for me while installing 100xdev.app (cms).
redwoodjs/redwood-tutorial#64

@manavkush
Copy link
Author

I've followed the same steps. Not sure what the issue is. Have tried to reinstall the whole project but still the same issue.
Some lead that I found was regarding postgres itself, that it wasn't allowing to populate data due to failing of unique constraints for id.

@shubhamrawat090
Copy link
Contributor

#196 this issue is discussed here as well.

@SujithThirumalaisamy
Copy link
Contributor

SujithThirumalaisamy commented Apr 13, 2024

I've followed the same steps. Not sure what the issue is. Have tried to reinstall the whole project but still the same issue. Some lead that I found was regarding postgres itself, that it wasn't allowing to populate data due to failing of unique constraints for id.

Then mostprobably you have the db seeded already. Nothing to worry

@kris08052000
Copy link

Solution to this problem is to add docker database and seed it. local db is faster and neon is slower

@manavkush
Copy link
Author

The database was already preeseeded. Found the data in the Tracks table. The yarn prisma migrate dev itself seeded the database also.
I think readme can be updated to not have confusion. @SujithThirumalaisamy Thanks! found the issue.

@manavkush
Copy link
Author

Closing the issue as the it's resolved.

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

No branches or pull requests

4 participants