Using proxy with expo-cli

Hello,

It’s been a few days that I’m trying to run expo on a mac that is behind a corporate firewall.

I’ve seen this related topic: Problems to use expo-cli when using proxy, however, I was not able to get any further. Declaring env variable before expo login has no effect (EXPO_DEBUG=true or proxy settings) and since I’m using a mac, I don’t have strace.

% expo login
Fetching the user profile failed
connect ECONNREFUSED 104.197.xxx.xxx:443
connect ECONNREFUSED 104.197.xxx.xxx:443
Error: connect ECONNREFUSED 104.197.xxx.xxx:443
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1146:16)
% expo diagnostics                         

  Expo CLI 4.0.2 environment info:
    System:
      OS: macOS 10.15.7
      Shell: 5.7.1 - /bin/zsh
    Binaries:
      Node: 14.15.1 - /usr/local/bin/node
      Yarn: 1.22.10 - /usr/local/bin/yarn
      npm: 6.14.8 - /usr/local/bin/npm
    IDEs:
      Xcode: /undefined - /usr/bin/xcodebuild
    npmPackages:
      expo: ^39.0.5 => 39.0.5 
      react: 16.13.1 => 16.13.1 
      react-dom: 16.13.1 => 16.13.1 
      react-native: https://github.com/expo/react-native/archive/sdk-39.0.3.tar.gz => 0.63.2 
    npmGlobalPackages:
      expo-cli: 4.0.2
    Expo Workflow: managed
% cat ~/.npmrc
//registry.npmjs.org/:_authToken=xxxxxxxxxxxxxxxxxxxxxxxxx
node_gyp=/usr/local/lib/node_modules/node-gyp/bin/node-gyp.js
proxy=http://domain.com:80
https-proxy=http://domain.com:80
http_proxy=http://domain.com:80
https_proxy=http://domain.com:80
% cat ~/.zshrc
export ALL_PROXY=http://domain.com:80
export HTTP_PROXY=$ALL_PROXY
export HTTPS_PROXY=$ALL_PROXY
export NO_PROXY="127.0.0.1,localhost"
export all_proxy=$ALL_PROXY
export http_proxy=$ALL_PROXY
export https_proxy=$ALL_PROXY
export no_proxy="127.0.0.1,localhost"

I’ve also tried to force proxy usage system wide by doing:

% networksetup -setwebproxy Ethernet domain.com 80
% networksetup -setsecurewebproxy Ethernet domain.com 80

but I still have the same output for expo login.

npm, brew and git are using the proxy and works fine.

Could anyone help me please?
thank you

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.