Skip to content

Unable to add modules behind corporate proxy #1089

@bariss0102

Description

@bariss0102

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions