Issue installing vidly-api-node dependencies

I’m following the React course and learning a lot, but ran into an issue in “Calling Backend Services” section. Specifically in video 20 - Setting up the Node Backend" at around 1:29, I am supposed to install the dependencies for vidly-api-node after cloning.

When I run “npm i” I get the following error:

node-pre-gyp ERR! Tried to download(404): https://github.com/kelektiv/node.bcrypt.js/releases/download/v1.0.3/bcrypt_lib-v1.0.3-node-v72-win32-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for bcrypt@1.0.3 and node@12.16.2 (node-v72 ABI) (falling back to source compile with node-gyp)
node-pre-gyp ERR! Tried to download(undefined): https://github.com/kelektiv/node.bcrypt.js/releases/download/v1.0.3/bcrypt_lib-v1.0.3-node-v72-win32-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for bcrypt@1.0.3 and node@12.16.2 (node-v72 ABI) (falling back to source compile with node-gyp)

2 Likes

Hi jpsnow72,
I am not sure if I had the same issue but I remember having an issue with bcrypt package and after hours of research on stack overflow I figured updating the package resolved my issue. Make sure you had the latest bcrypt package for it to work. (i.e. npm i bcrypt from terminal without adding a package versioin)

Good luck,
-Abdu

Hi Abdu,

Thank you! I am a bit new to NPM (in addition to React), so wasn’t quite sure what to try. Your suggestion helped. I ended up running npm i bcrypt first and ran into the same error (it was trying to get same package), so ended up manually adding the version to the end: npm i bcrypt@5.0.0

Hopefully having this version won’t cause issues.
Thanks again!

3 Likes

npm i bcrypt installed the latest version for me (i.e.bcrypt@5.0.0) and didn’t have any issues since then. Glad it worked for you!

1 Like

Thank you all. That saved my life.
Been struggling for hours with that same error.
I managed to solve it by first doing the ‘npm i bcrypt@5.0.0’ and then ‘npm i’.
Now working like a charm

2 Likes

You guys have saved my life.

2 Likes

not working for me , npm code 1 error

omagad you saved both lives

Thanks for all the tips in this thread. It’s saved me a lot of time.

I’ve been really enjoying this course, but especially given people are paying for it it’d be helpful if Mosh could update his github project so the references aren’t broken.

1 Like

Hi again. As long as we’re here, I’ve also noticed that video 20 states there should be a genres table, a movies table and a users table.

After I ran “node seed.js” I only got the first two tables, and reading the code it only seems to be trying to create those two tables. (I’ve since created the users table manually using Compass and will wait to see if what I’ve done conflicts with anything.)

Following that, video 21 talks about disabling auth by editing default.json… but in the project that’s been static on github for 3 years (this one - vidly-api-node/default.json at master · mosh-hamedani/vidly-api-node · GitHub ) it already seems to be set to false, so I didn’t get the failed auth response when initially testing creation of a new movie. I got a 200 response instead, which is the expectation intent later in the video after the change has been made.

These are all things that can be worked around, but hopefully explaining them will help avoid potential confusion for others.

2 Likes

you saved my life, thank you !