My office is suck and putting us behind a proxy server. This question has been asked for a few and long time. Can I develop RN with expo through a proxy server if I am going with a PC?
Hey @mannok,
You can read about CLI proxy configurations here: https://docs.expo.io/versions/latest/introduction/troubleshooting-proxies#command-line-application-proxy-configuration
Basically you need to set http_proxy
and https_proxy
environment variables.
Cheers,
Adam
Hi @adamjnav ,
Thanks for your help. I still cannot run expo after I set the Environment variables.
May I know how to solve it?
ENV
C:\Users\xxx>SET HTTP
HTTPS_PROXY=http://xxx:yyy@zzz:8080
HTTP_PROXY=http://xxx:yyy@zzz:8080
.npmrc
proxy=http://xxx:yyy@zzz:8080
https-proxy=http://xxx:yyy@zzz:8080
.gitconfig
[user]
name = test
email = test@gmail.com
[http]
proxy = http://xxx:yyy@zzz:8080
[https]
proxy = http://xxx:yyy@zzz:8080
After I run expo eject
the console shows
Downloading Android code...
[13:30:58] Request failed with status code 400
[13:30:58] Error: Request failed with status code 400
at createError (C:\Users\mnwong_01\AppData\Roaming\npm\node_modules\expo-cli\node_modules\xdl\node_modules\axios\lib\core\createError.js:16:15)
at settle (C:\Users\mnwong_01\AppData\Roaming\npm\node_modules\expo-cli\node_modules\xdl\node_modules\axios\lib\core\settle.js:17:12)
at RedirectableRequest.handleResponse (C:\Users\mnwong_01\AppData\Roaming\npm\node_modules\expo-cli\node_modules\xdl\node_modules\axios\lib\adapters\http.js:211:9)
at emitOne (events.js:116:13)
at RedirectableRequest.emit (events.js:211:7)
at RedirectableRequest._processResponse (C:\Users\mnwong_01\AppData\Roaming\npm\node_modules\expo-cli\node_modules\follow-redirects\index.js:269:10)
at ClientRequest.RedirectableRequest._onNativeResponse (C:\Users\mnwong_01\AppData\Roaming\npm\node_modules\expo-cli\node_modules\follow-redirects\index.js:50:10)
at Object.onceWrapper (events.js:315:30)
at emitOne (events.js:116:13)
at ClientRequest.emit (events.js:211:7)
This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.