While testing a user registry script in my current api, I found that await bcrypt.hash is causing node process to not close. bcrypt.hashSync is not causing this issue. To debug, I removed the line of bcrypt hashing, and then I saw node process closing successfully. Then I tried using why-is-node-running and found that while the line is commented out, there is 1 process more than normal, and while line is there, I see 1 process less there.
What went wrong?
While testing a user registry script in my current api, I found that
await bcrypt.hash
is causing node process to not close.bcrypt.hashSync
is not causing this issue. To debug, I removed the line of bcrypt hashing, and then I saw node process closing successfully. Then I tried usingwhy-is-node-running
and found that while the line is commented out, there is 1 process more than normal, and while line is there, I see 1 process less there.How can we reproduce the error?
yarn test
ornpm run test
What did you expect to happen?
I expected node process to successfully exit
Which version of nodejs and OS?
NodeJS : 16.6.1 OS : Windows 11 (64-bit)
Thanks!