# How to fix npm install in Mastering React course vidly-api-node?

**URL:** <https://forum.codewithmosh.com/t/how-to-fix-npm-install-in-mastering-react-course-vidly-api-node/5425>\
**Category:** React\
**Created:** [June 10, 2021, 5:45am UTC](https://forum.codewithmosh.com/t/how-to-fix-npm-install-in-mastering-react-course-vidly-api-node/5425 "2021-06-10T05:45:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ulugbek](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/ulugbek/32/1752_2.png) [@Ulugbek](https://forum.codewithmosh.com/u/Ulugbek)\
**Post date:** [June 10, 2021, 5:45am UTC](https://forum.codewithmosh.com/t/how-to-fix-npm-install-in-mastering-react-course-vidly-api-node/5425/1 "2021-06-10T05:45:15Z")

</div>

I am following along the course of Mastering React, currently i am having problem with npm install, when i clone ‘vidly-api-node’ from gihtub. it logging a bunch of errors related to gyp and bcrypt\_lib? Can anyone explain why i am having this problem and how to fix?

 ![Screen Shot 2021-06-10 at 14.47.13](https://us1.discourse-cdn.com/flex020/uploads/codewithmosh/original/2X/a/ad72ad2fbdd7fc88d8c5085433b3633287bb1859.jpeg)

---

<div class="post-metadata">

**Author:** ![Ulugbek](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/ulugbek/32/1752_2.png) [@Ulugbek](https://forum.codewithmosh.com/u/Ulugbek)\
**Post date:** [June 11, 2021, 1:44am UTC](https://forum.codewithmosh.com/t/how-to-fix-npm-install-in-mastering-react-course-vidly-api-node/5425/2 "2021-06-11T01:44:02Z")

</div>

Finally i found out the solution after long search on google, if anyone encounters this kind of issue in the future here are the commands to run:

**sudo npm cache clean -f  
sudo npm install -g n  
sudo n 8.4.0**

---

<div class="post-metadata">

**Author:** ![pritamaber](https://avatars.discourse-cdn.com/v4/letter/p/6f9a4e/32.png) [@pritamaber](https://forum.codewithmosh.com/u/pritamaber)\
**Post date:** [June 20, 2021, 2:59pm UTC](https://forum.codewithmosh.com/t/how-to-fix-npm-install-in-mastering-react-course-vidly-api-node/5425/3 "2021-06-20T14:59:31Z")

</div>

Im also faceng the same problem but the given solution did not work for me (npm install -g n )

---

<div class="post-metadata">

**Author:** ![pritamaber](https://avatars.discourse-cdn.com/v4/letter/p/6f9a4e/32.png) [@pritamaber](https://forum.codewithmosh.com/u/pritamaber)\
**Post date:** [June 20, 2021, 3:07pm UTC](https://forum.codewithmosh.com/t/how-to-fix-npm-install-in-mastering-react-course-vidly-api-node/5425/4 "2021-06-20T15:07:49Z")

</div>

there is another solution which worked for me , that is to delete the existing bcrypt module and installing new one

thanks

---

<div class="post-metadata">

**Author:** ![UniqueNospaceShort](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/uniquenospaceshort/32/1814_2.png) [@UniqueNospaceShort](https://forum.codewithmosh.com/u/UniqueNospaceShort)\
**Post date:** [June 24, 2021, 11:20am UTC](https://forum.codewithmosh.com/t/how-to-fix-npm-install-in-mastering-react-course-vidly-api-node/5425/5 "2021-06-24T11:20:54Z")

</div>

Hi.  
Interesting.  
I actually fixed these errors another way.  
That said this n package is platform specific and is not a valid for Windows.

```auto
PS D:\Users\User\Desktop\vidly-api-node-master> npm install -g n
npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported platform for n@7.3.0: wanted {"os":"!win32","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! notsup Valid OS: !win32
npm ERR! notsup Valid Arch: any
npm ERR! notsup Actual OS: win32
npm ERR! notsup Actual Arch: x64

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\User\AppData\Roaming\npm-cache\_logs\2021-06-24T11_11_16_087Z-debug.log

```

As for why it happens, I have little to no clue. gyp is a compiler for native addons for Node.js.  
Seems bcrypt installation involves platform specific compilation. They probably have a common code base and did not compile platform specific packages. That just guessing. All I know from node and npm is their general purpose and a few commands I ever typed to test or start the servers I deal with and manage packages.

Kind Regards.
