Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to open existing project in React Native?

Tags:

react-native

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.

like image 630
Von Avatar asked Jun 26 '17 17:06

Von


People also ask

How do I open an existing reaction project?

2 Answers. Show activity on this post. Open a terminal on vscode, then make sure you already node installed. Type npm install after that npm run start or whatever command to run, you can see on package.


1 Answers

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.

like image 102
Von Avatar answered Sep 30 '22 00:09

Von