Tempuslight
Tempuslight

Reputation: 1203

Trying out Expo for React Native, just did an "init", getting socketException error?

Last week I started learning about React Native and using Expo. I created some small apps using "expo init (name)" etc, followed some tutorials, tried some stuff you know the drill.

Today I wanted to start working on a small app idea I have and wanted to do it using Expo CLI instead of React Native CLI first, since building, testing etc is supposed to be easier using Expo.

I just made a new project using "expo init (name)", selecting blank template (so nothing fancy) and running "npm start", then scanning the code with my smartphone app and the app crashes instantly. The error is as follows:

"Uncaught Error: java.net.SocketException: Connection reset"

What does this mean? How can I fix it? I really want to start today using Expo...

Upvotes: 1

Views: 1083

Answers (1)

Imran Shad
Imran Shad

Reputation: 58

This happens when you mobile and system using different internet connection or port. so try following

  1. Make sure you have stable internet connection and your device and system connected with same internet connection
  2. remove node_modules folder
  3. run npm install
  4. npm start --reset-cache
  5. scan bar code to run it on your device

Upvotes: 2

Related Questions