cli icon indicating copy to clipboard operation
cli copied to clipboard

Unable to add modules behind corporate proxy

Open bariss0102 opened this issue 4 months ago • 0 comments

npx nuxi module add command doesn't use behind a corporate proxy. Development machines are windows based. Based on the logs none of the requests go through the proxy which cause the connections to fail:

[nuxi 15:10:48]  WARN  Cannot search in the Nuxt Modules database: 
FetchError: [GET] "https://api.nuxt.com/modules?version=all": <no response> fetch failed


 ERROR  [GET] "https://registry.npmjs.org/nuxt-authorization": <no response> fetch failed
...
[cause]: read ECONNRESET

        at TLSWrap.onStreamRead (node:internal/stream_base_commons:216:20)



 ERROR  [GET] "https://registry.npmjs.org/nuxt-authorization": <no response> fetch failed

This is just one example, all modules seem to fail. The following environment variables were set, but it still doesn't use the proxy:

$env:NODE_TLS_REJECT_UNAUTHORIZED="0"
$env:HTTPS_PROXY="http://user:password@ip:port/"
$env:HTTP_PROXY="http://user:password@ip:port/"
$env:PROXY="http://user:password@ip:port/"
$env:ALL_PROXY="http://user:password@ip:port/"

npm proxy configs are set up, and npm commands use proxy as expected. Modifying host files or creating a local proxy server is not an option. We have verified that none of the connections were dropped by neither the proxy nor the firewall.

We are currently using the vscode extension nuxtr as a workaround, or manually installing modules. Is there a config that we are missing? How can we make sure that the nuxi commands use given proxy settings?

bariss0102 avatar Oct 15 '25 12:10 bariss0102