'Expo Error starting tunnel Failed to install @expo/ngrok@^2.4.3 globally
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.
Solution 1:[1]
run npm install @expo/[email protected]
Solution 2:[2]
Install ngrok and run it in terminal using this command ngrok http 3000. Then in other terminal run expo start. It will work surely.
Solution 3:[3]
The instructions are not intuitive, so here is a fix:
npm install @expo/ngrok
brew install ngrok
ngrok http 3000
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.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | kenkn |
Solution 2 | Bilal Yaqoob |
Solution 3 | Zorayr |