'How to resolve err code 403 Forbidden in npm install?

I'm trying to run npm install in a public repository. I’ve cloned it to my PC but it throws me this error.

I’ve tried verifying my npm account, and disabling my security/firewalls.

I dont know how to solve it!

$ npm install
npm ERR! code E403
npm ERR! 403 403 Forbidden - GET <url>
npm ERR! 403 In most cases, you or one of your dependencies are requesting
npm ERR! 403 a package version that is forbidden by your security policy, or
npm ERR! 403 on a server you do not have access to.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\...


Solution 1:[1]

Nothing to worry about. Probably, there is a security policy for different libraries (in case it is corporate project). In this case you need to investigate your issue to someone in your company.

Another case can be with package-lock.json

Just open lock file and try to find something similar to received URL.

Try to delete lock file and after that run npm install

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Elli Zorro