12

I'm trying to run expo with a tunnel connection and I keep getting the following error:

Error starting tunnel Failed to install @expo/ngrok@^2.4.3 globally: npm exited with non-zero code: 243

I've tried installing this version of ngrok globally and just within my project as well as removing it to allow expo to do the install automatically. It did run successfully once by starting the project with expo start instead of npm start but this seems to no longer work.

SamH
  • 203
  • 1
  • 2
  • 13

4 Answers4

19

run npm install @expo/ngrok@2.4.3

kenkn
  • 214
  • 2
  • 3
8

The instructions are not intuitive, so here is a fix:

  1. npm install @expo/ngrok
  2. brew install ngrok
  3. ngrok http 3000
  4. expo start --tunnel

Wish Expo simplifies this; they shouldn't have a button that says "tunnel" if there is an entire setup that's not properly explained.

Zorayr
  • 23,770
  • 8
  • 136
  • 129
1

Install ngrok and run it in terminal using this command ngrok http 3000. Then in other terminal run expo start. It will work surely.

Bilal Yaqoob
  • 790
  • 1
  • 10
  • 22
1

For yarn yarn global add @expo/ngrok@^4.1.0

Pencilcheck
  • 2,664
  • 3
  • 25
  • 14