7

The first time I used React Native I successfully installed everything to work with iOS development on my macbook and I was able to create a project and view it on a phone. However, now that I'm returning to it I cannot seem to figure out how to open my existing project. I have tried looking for a guide but the only guides I can find are for first time setup.

In the terminal I have tried:

$ cd MyProjectFolder $ react-native init MyProject

but this seems to want to overwrite my project with a new one.

I am also trying:

$ cd MyProjectFolder $ react-native start

This seems like it may be on the right track but the response I get is:

Running packager on port 8081.  

 │                                                                            
 │  Keep this packager running while developing on any JS projects. Feel      │ 
 │  free to close this tab and run your own packager instance if you          │ 
 │  prefer.                                                                   │ 
 │                                                                            │ 
 │  https://github.com/facebook/react-native   


Looking for JS files in
   /Users/User/MyProject 


React packager ready.

Loading dependency graph, done.

This seems like it's working but I cannot connect with an iPhone via Expo and I'm unsure where to go from here. I feel as though there is a step I'm missing.

Von
  • 163
  • 1
  • 2
  • 9

1 Answers1

2

I figured out my mistake. The step I was missing was that I had not started the server with

$ npm start

After entering the following in the terminal:

$ cd MyProjectFolder
$ react-native start

I simply opened a second tab in terminal and entered $ npm start and it loaded up just like the first time.

Von
  • 163
  • 1
  • 2
  • 9
  • Hi I am facing the same issue, could you elaborate a little here? I want to use text, etc components of react-native library in my existing project. I am not able to find the exact steps to do that... the steps they mentioned creates a new project for me each time – user3868051 Jul 06 '17 at 20:23
  • @user3868051 sorry I'm not sure I understand what you're trying to do. Maybe try asking your own question as this doesn't seem quite the same as what I was trying to do. – Von Jul 10 '17 at 16:24