NPM: Unable to Verify the First Certificate

I just recently given a test whereby one of the question requires me to build an API. There's plenty of ways on how to complete the test. I can always stick with C#/ASP.Net, but I decided to try something new; NodeJS and MongoDB. Both of it is fairly new to me.

As usual, I do some research online in order to find the right tutorial where I can learn and understand how they work and their syntax as well. For me, as long as you get the logic right, it doesn't matter what language you use, you'll get there in no time. :)

Problem
I found this tutorial very helpful; Build a Node.js API in Under 30 Minutes. While following the steps in that tutorial, I encounter this issue(s) when I tried to "npm install". It displayed below error.


If you refer to the above screenshot; the root cause of the error is because it's unable to verify the first certificate. Based on my previous experiences, it might caused by the https.

Solution
As usual, I start digging around and it turns out that my hypothesis are correct! All you need to do is change the reference or the path from https to http. You can refer to this link. That's it and you're good to go!


Just thought that this might help if you guys came across the same issue(s) as I did. Till then. :)