# Cannot install dependencies for vidfly-api-node

**URL:** <https://forum.codewithmosh.com/t/cannot-install-dependencies-for-vidfly-api-node/394>\
**Category:** React\
**Created:** [October 31, 2020, 3:24am UTC](https://forum.codewithmosh.com/t/cannot-install-dependencies-for-vidfly-api-node/394 "2020-10-31T03:24:27Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![andresramilo](https://avatars.discourse-cdn.com/v4/letter/a/5e9695/32.png) [@andresramilo](https://forum.codewithmosh.com/u/andresramilo)\
**Post date:** [October 31, 2020, 3:24am UTC](https://forum.codewithmosh.com/t/cannot-install-dependencies-for-vidfly-api-node/394/1 "2020-10-31T03:24:27Z")

</div>

I’m currently taking the mastering react course, in have a problem in installing the dependencies for vidfly-api-node. Apparently there are some 404 errors when getting modules and trying to compile using node-gyp.  
When i ran: **npm i**  
I got the message below

Tried to download(404): [https://github.com/kelektiv/node.bcrypt.js/releases/download/v1.0.3/bcrypt\_lib-v1.0.3-node-v72-darwin-x64.tar.gz](https://github.com/kelektiv/node.bcrypt.js/releases/download/v1.0.3/bcrypt_lib-v1.0.3-node-v72-darwin-x64.tar.gz)  
node-pre-gyp ERR! Pre-built binaries not found for bcrypt@1.0.3 and node@12.13.1 (node-v72 ABI) (falling back to source compile with node-gyp)  
How can i solve this??

---

<div class="post-metadata">

**Author:** ![hakuhal](https://avatars.discourse-cdn.com/v4/letter/h/b19c9b/32.png) [@hakuhal](https://forum.codewithmosh.com/u/hakuhal)\
**Post date:** [November 1, 2020, 12:37pm UTC](https://forum.codewithmosh.com/t/cannot-install-dependencies-for-vidfly-api-node/394/2 "2020-11-01T12:37:19Z")

</div>

Hi, use bcrypt newest version is also worked. So detele the package-lock.json and node-modules and run `npm i` again.

If it is still not worked, install the package seperately, `npm i bcrypt`.

If this still not worked, delete package-lock and node-modules, run `yarn install` instead.

---

<div class="post-metadata">

**Author:** ![suhrobmuboraksho](https://avatars.discourse-cdn.com/v4/letter/s/90ced4/32.png) [@suhrobmuboraksho](https://forum.codewithmosh.com/u/suhrobmuboraksho)\
**Post date:** [November 11, 2020, 7:02pm UTC](https://forum.codewithmosh.com/t/cannot-install-dependencies-for-vidfly-api-node/394/3 "2020-11-11T19:02:11Z")

</div>

I had the same issue. During Node Setup “bcrypt” couldn’t be installed.

The easy solution is just switch from the “bcrypt” npm module to bcrypt-nodejs. It’s the exact same API, but pure JS so no native add-ons to deal with.

npm uninstall --save bcrypt  
npm install --save bcrypt-nodejs

Change:  
Modify “const bcrypt = require(‘bcrypt-nodejs’)” in users.js and auth.js files.

Source: [https://stackoverflow.com/questions/29320201/error-installing-bcrypt-with-npm](https://stackoverflow.com/questions/29320201/error-installing-bcrypt-with-npm)

---

<div class="post-metadata">

**Author:** ![rollingtatoo22](https://avatars.discourse-cdn.com/v4/letter/r/dc4da7/32.png) [@rollingtatoo22](https://forum.codewithmosh.com/u/rollingtatoo22)\
**Post date:** [November 26, 2020, 6:27pm UTC](https://forum.codewithmosh.com/t/cannot-install-dependencies-for-vidfly-api-node/394/4 "2020-11-26T18:27:08Z")

</div>

Hi all.  
I had the same issue; hakuhal’s solution did not work out for me, but suhrobmuboraksho’s solution did.

---

<div class="post-metadata">

**Author:** ![rollingtatoo22](https://avatars.discourse-cdn.com/v4/letter/r/dc4da7/32.png) [@rollingtatoo22](https://forum.codewithmosh.com/u/rollingtatoo22)\
**Post date:** [November 27, 2020, 2:29am UTC](https://forum.codewithmosh.com/t/cannot-install-dependencies-for-vidfly-api-node/394/5 "2020-11-27T02:29:27Z")

</div>

Additionally, i just encountered a server issue where i couldn’t post new users. The solution i found was to replace the calls to _**bcrypt.genSalt(10)**_ by _**bycrypt.genSaltSync(10)**_, and _**bcrypt.hash(user.password, salt)**_ by _**bcrypt.hashSync(user.password, salt)**_.

The original methods have been updated and now need to be provided a callback function in parameters, but those works just as the old ones.

Edit: Also compare with compareSync

---

<div class="post-metadata">

**Author:** ![suhrobmuboraksho](https://avatars.discourse-cdn.com/v4/letter/s/90ced4/32.png) [@suhrobmuboraksho](https://forum.codewithmosh.com/u/suhrobmuboraksho)\
**Post date:** [December 11, 2020, 11:05am UTC](https://forum.codewithmosh.com/t/cannot-install-dependencies-for-vidfly-api-node/394/6 "2020-12-11T11:05:23Z")

</div>

Update: “bcrypt-nodejs” is deprecated. install “bcryptjs” instead. I encountered a problem when started Section 8 (Calling Backend Services). I was not able to register user. After some research “bcryptjs” was the solution.

---

<div class="post-metadata">

**Author:** ![jufriazzq](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jufriazzq](https://forum.codewithmosh.com/u/jufriazzq)\
**Post date:** [February 16, 2021, 3:21am UTC](https://forum.codewithmosh.com/t/cannot-install-dependencies-for-vidfly-api-node/394/7 "2021-02-16T03:21:13Z")

</div>

thank youuu suhrobmuboraksho

---

<div class="post-metadata">

**Author:** ![jufriazzq](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jufriazzq](https://forum.codewithmosh.com/u/jufriazzq)\
**Post date:** [February 16, 2021, 9:22am UTC](https://forum.codewithmosh.com/t/cannot-install-dependencies-for-vidfly-api-node/394/8 "2021-02-16T09:22:15Z")

</div>

may i know the explanation behind this ?

---

<div class="post-metadata">

**Author:** ![Krishna](https://avatars.discourse-cdn.com/v4/letter/k/71c47a/32.png) [@Krishna](https://forum.codewithmosh.com/u/Krishna)\
**Post date:** [February 26, 2021, 1:59pm UTC](https://forum.codewithmosh.com/t/cannot-install-dependencies-for-vidfly-api-node/394/9 "2021-02-26T13:59:25Z")

</div>

Thank you so much for your solution…

---

<div class="post-metadata">

**Author:** ![kunalP](https://avatars.discourse-cdn.com/v4/letter/k/59ef9b/32.png) [@kunalP](https://forum.codewithmosh.com/u/kunalP)\
**Post date:** [April 1, 2021, 3:12am UTC](https://forum.codewithmosh.com/t/cannot-install-dependencies-for-vidfly-api-node/394/11 "2021-04-01T03:12:48Z")

</div>

Hi,

I am still facing issue in getting the users in my mongodb.

---

<div class="post-metadata">

**Author:** ![droidob](https://avatars.discourse-cdn.com/v4/letter/d/77aa72/32.png) [@droidob](https://forum.codewithmosh.com/u/droidob)\
**Post date:** [May 20, 2021, 8:09am UTC](https://forum.codewithmosh.com/t/cannot-install-dependencies-for-vidfly-api-node/394/12 "2021-05-20T08:09:39Z")

</div>

bcryptjs worked also for me. Thanks _suhrobmuboraksho_

---

<div class="post-metadata">

**Author:** ![mykfrost](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/mykfrost/32/3918_2.png) [@mykfrost](https://forum.codewithmosh.com/u/mykfrost)\
**Post date:** [August 10, 2022, 12:26pm UTC](https://forum.codewithmosh.com/t/cannot-install-dependencies-for-vidfly-api-node/394/13 "2022-08-10T12:26:55Z")

</div>

Hey guys. i had the same issue but after following the thread i solved it. Thank you so much. However in my database collection i am missing the users. does anyone know how to solve this ?

---

<div class="post-metadata">

**Author:** ![AlmTalal](https://avatars.discourse-cdn.com/v4/letter/a/6de8d8/32.png) [@AlmTalal](https://forum.codewithmosh.com/u/AlmTalal)\
**Post date:** [August 11, 2022, 8:18pm UTC](https://forum.codewithmosh.com/t/cannot-install-dependencies-for-vidfly-api-node/394/14 "2022-08-11T20:18:54Z")

</div>

I had the same error and i solve it thanks to you

---

<div class="post-metadata">

**Author:** ![Mdchristien](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/mdchristien/32/5930_2.png) [@Mdchristien](https://forum.codewithmosh.com/u/Mdchristien)\
**Post date:** [September 19, 2023, 12:15pm UTC](https://forum.codewithmosh.com/t/cannot-install-dependencies-for-vidfly-api-node/394/15 "2023-09-19T12:15:15Z")

</div>

suhrobmuboraksho thank you so much for your solution
