'npx prisma db seed' not responding
anyone have this issue where seeding the db does nothing and gets stuck? screenshot at the bottom of this post
this is my seed.ts

Solution:Jump to solution
oh i figured it out, you don't set the schema to password: password, you just say password
5 Replies
also, when i change the seeding file to:
it now works
so it seems like the seed.ts file doesn't like me using bcrypt.hash() in the way i'm using it
Solution
oh i figured it out, you don't set the schema to password: password, you just say password
Isn't that just an ESLint rule?
{ password }
is equivalent to { password : password }
yeah on second thought it might have been the hash('test', 123)
i think thats an invalid second argument
but i changed both at the same time before running
npx prisma db seed
again
and after that it worked. I think maybe 12 is a specific thing and not an random seed to a hash functionfrom their README, argument 2 is:
salt - [REQUIRED] - the salt to be used to hash the password. if specified as a number then a salt will be generated with the specified number of rounds and usedhttps://github.com/kelektiv/node.bcrypt.js#api
GitHub
GitHub - kelektiv/node.bcrypt.js: bcrypt for NodeJs
bcrypt for NodeJs. Contribute to kelektiv/node.bcrypt.js development by creating an account on GitHub.