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

Error When Try to install by using npm i #42

Open
touhid-imam opened this issue Nov 3, 2020 · 6 comments
Open

Error When Try to install by using npm i #42

touhid-imam opened this issue Nov 3, 2020 · 6 comments

Comments

@touhid-imam
Copy link

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
Copy link

casbie commented Nov 23, 2020

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
Copy link

codingChewie commented Dec 18, 2020

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.

  • delete bcrypt from the dependencies: npm uninstall bcrypt
  • install bcryptjs: npm i bcryptjs
  • replace instances of bcrypt in routes auth.js and users.js with:
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
Copy link

Thanks so much @codingChewie, your solution worked for me

@manudeli
Copy link

manudeli commented May 8, 2021

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

@roiko
Copy link

roiko commented Jun 17, 2021

@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
Copy link

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

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

7 participants