npm has separate proxy and https-proxy settings. The distinction is the destination being requested. For a normal HTTP proxy that tunnels HTTPS, both values can point to the same http:// endpoint.

A project-level .npmrc can contain:

proxy=http://203.0.113.10:8080
https-proxy=http://203.0.113.10:8080
noproxy=localhost,127.0.0.1,registry.example.internal

Replace the documentation endpoint with your proxy; for permitted public-registry tests, the HTTP proxy list supplies HTTP candidates. The last line deliberately leaves the named internal registry direct. It is not another proxy address.

Ask npm to make a request

A cached install is a poor routing test: npm might already have everything it needs. A registry ping is a smaller check:

npm ping --registry=https://registry.npmjs.org/

Successful completion shows that this npm invocation reached that registry route. It does not establish that every tarball host, Git dependency, or separate package-manager process uses the same path.

To locate a conflicting setting, inspect the effective values rather than immediately editing more files:

npm config get proxy
npm config get https-proxy
npm config get noproxy

Those commands can print credentials if they are embedded in a URL. Inspect the output locally rather than pasting it unchanged into an issue.

A project .npmrc is not used for global installs. If only npm install -g fails, check that invocation's effective configuration rather than assuming it read the project file.

Check exclusions before changing the IP

npm also works with proxy environment variables, and its noproxy setting can come from NO_PROXY. A destination excluded by the effective configuration may connect directly even though a proxy value exists. Conversely, deleting a line from one .npmrc does not remove an inherited environment variable.

Keep certificate errors separate

An authorized inspecting proxy may require an organization CA that your Node/npm setup does not yet trust. npm supports a CA file:

cafile=/path/to/approved-ca-bundle.pem
strict-ssl=true

Use the actual approved bundle for that environment. Setting strict-ssl=false weakens certificate verification; it is not a replacement for choosing the right proxy or trust material.

When testing ends, remove the project overrides you added and review the effective values again. That lets the project inherit its previous configuration without changing other projects on the same machine.

Tënë sô zo