0

I am trying to install bunch of packages on my Windows Server 2019 machine. This machine is given to me by company I am working for so there are definitely some policies and firewall configs applied for security purposes. I have spent so many forums and websites for solutions but unable to find it.

Here is an error that I am getting while installing any package. openssl in this example.

npm ERR! code E403
npm ERR! 403 403 Forbidden - GET https://registry.npmjs.org/openssl
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\username\AppData\Local\npm-cache\_logs\2023-04-06T12_36_46_252Z-debug-0.log

Most of the answers I found regarding this issue are related to publishing the package. I am not publishing the package.

I have a project deadline coming up and I need to fix it ASAP, so any help would be greatly appreciated.

Solutions I have tried so far

  1. Setting the npm config strict-ssl to false
  2. Changing registry from https://registry.npmjs.org/ to http://registry.npmjs.org/openssl, back and forth. Same error with http & https.
  3. Specifying a cafile variable to certificate path as mentioned in one of these answers. How to fix SSL certificate error when running Npm on Windows?
    • I am not sure whether I am providing the right certificate or not.
  4. I checked the proxy settings on my machine using netsh.exe winhttp show proxy command. which gives following output.
    Current WinHTTP proxy settings:
    
    Direct access (no proxy server).
    
  • You could at least follow instructions on how to install npm packages to computers without internet access. – James Z Apr 06 '23 at 16:26

0 Answers0