I had a similar error, turned out i was installing bcrypt instead of bcryptjs on my backend . check your package.json on your backend !