BloodOverdrive
BloodOverdrive

Reputation: 388

How can I set up an Expo app to work behind a corporate proxy?

I want to try to React Native / Expo App on my company PC (Windows).

I was following all guides on Proxy setup and settings, but I'm still getting this error.

Unable to reach Expo servers. Falling back to using the cached dependency map (bundledNativeModules.json) from the package "expo" installed in your project.

I've added proxies to .npmrc file, also tried changing URL Server by this command_

export EXPO_PACKAGER_PROXY_URL=http://expo.dev npx expo start

Tried to set up tunneling, but unsuccessfully.

Has anyone encountered similar problems and found solution to it.

Thanks in advance

Upvotes: 2

Views: 1478

Answers (1)

server_unknown
server_unknown

Reputation: 650

I deal with this same issue at work. I have discovered a few work-arounds through trial and error.

  1. use yarn to import expo modules. This seems to help with the dependency issues that expo imports often have.

  2. set yarn config to yarn config set strict-ssl false -g if you are receiving SSL errors.

  3. run this command - $Env:NODE_TLS_REJECT_UNAUTHORIZED=0 if you are receiving SELF_SIGNED_CERT_IN_CHAIN errors. <--this is not 100% safe because makes TLS connections and HTTPS requests insecure by disabling certificate verification -- use at your own risk.

The Unable to reach Expo servers... error still renders, but I can just ignore it and continue.

Upvotes: 1

Related Questions