mosh-hamedani / vidly-api-node

309 stars 285 forks source link

Error When Try to install by using npm i #42

Open touhid-imam opened 3 years ago

touhid-imam commented 3 years ago

Hi Mosh, when I try to install by using npm i then it's showing error and not installed properly, if you could look into this issue then it would be great.

Thanks

casbie commented 3 years ago

Hi, if the error is caused by the module bcrypt, please refer to this discussion!

https://forum.codewithmosh.com/t/cannot-install-dependencies-for-vidfly-api-node/394

Also @mosh-hamedani could you help update this dependency issue? Thank you!

codingChewie commented 3 years ago

I ran into this error when taking the "Mastering React" course. The solution will need to be resolved before seeding the database or users will not be added as a collection. While the thread linked above was somewhat helpful there is an easier way.

const bcrypt = require('bcryptjs')

seed the vidly database with node seed.js and all three collections should appear. Still taking the course but when I reference the API from postman (http://localhost:3900/api/movies) I get the movies results back with a 200 status code.

bcrypt version: "^2.4.3"

davidoluseun commented 3 years ago

Thanks so much @codingChewie, your solution worked for me

manudeli commented 3 years ago

Thanks so much!!!! @codingChewie You made me escape from a bunch of errors!!! 👍👍👍👍👍

roiko commented 3 years ago

@codingChewie 's solution works for me but, in order to see the "users" collection, I had to run node index.js after the described steps!

Flexsidee commented 3 years ago

@roiko thanks for including the last step, its after i did that then it worked.