I'm pretty new to the expo and developing a mobile app, currently I'm using expo dan react native
I've built an app with the expo and I want to open it on another laptop, so I use GitHub to commit my work there
on the new laptop I already installed expo, node, vs, etc. i cloned the project and can't start it on my new laptop with "npm start"
it shows error like this
"Cannot determine which native SDK version your project uses because the module expo is not installed"
which I already checked on my cmd with expo --version
TL: DR how do I start the expo on another laptop with GitHub?
I already fixed the issue, the console recommended me to do yarn add expo , i already did the yarn add expo before writing this question and it didnt fix me thats why i thought there is something i need to do other than doing that
so after exploring expo documentation and found nothing , i just tried to do yarn add expo BUT in my cmd , not in my console on vs code
it worked perfectly for me and the strange thing is , i cant debug expo in my phone with LAN connection, which now i have to use tunnel connection for this to work where in my old computer i use the LAN connection perfectly fine
TLDR : do yarn add expo in cmd not in vs code console
Did you already clone your repo to your new machine?
If not you should download your code to your new laptop.
Next you will have to cd to the directory of your app in your terminal.
Afterwards you’ll have to run
expo install
And after this is done you can run the following command (still in your app folder)
expo start
Related
I am a beginner in React-native
So i tried to start react-native.. I went to so many youtube tutorials and udemy courses..
At last i set up mu native environment.. start react-native
First i went on Getting Started React-Native site..
then i init awesomeproject to my local storage..
then run react-native run-android..
Emulator displayed correct output..
so i tried to do more projects and tried to learn react-native
so i init new project called "ChatApp"
using
react-native init ChatApp
project was successfully installed.
So again i tried to
cd ChatApp
then
react-native run-android
But still i get that old "awesomeapp"
I dont no what to do
I deleted chache memory and app in the emulator and i deleted sdk in android studio after that i again try to run the command still i get that older app..
I guess you meant cd ChatApp.
Otherwise, every new project you will create with the react-native init command will be exactly the same! If you made some modifications but the UI doesn't update, be sure that there is no other react-native instances running.
I'm running my project on expo. After running expo eject, I'm getting the following error:
The Expo SDK requires Expo to run
Even for a brand new project I'm getting this error and I cannot do anything with expo anymore.
I run :
expo init Project1
and then going inside the Project1 direcotory and run:
expo start // and then click 'a' for running project on android emulator.
and emulator screen shows this error.
If you have logged into the command line on your computer, log out and try reloading the app. Otherwise reinstall expo and try again.
I am familiar with React Native. I got a new macbook and I am trying to create a new file. However, when I run create-react-native-app [name of app] I am greeted with:
This command requires Expo CLI.
Do you want to install it globally [Y/n]?
When I pressed Y it created the file, however, in a complete file layout. It looked so odd and there were some files missing too.
Normally, when I run create-react-native-app it created the file without asking anything about expo. I am pretty confused. I'm pretty sure I have done wrong somewhere. Where and how I can get the traditional installation process back?
I also know that expo helps with testing. Since may I have been using npm start and npm run ios to test my apps on device and xcode simulation.
https://facebook.github.io/react-native/docs/getting-started I followed this.
New version out now and create react native app has been merged with expo CLI.
To avoid any bug use new version to create react apps, follow the command bellow which is also in the link given in your question.
expo init AwesomeProject
After installation you will be guided to start project with expo start.
cd AwesomeProject
expo start
Everytime I try to launch a react native project I got this error
Could not install the app on the device, read the error above for
details. Make sure you have an Android emulator running or a device
connected and have set up your Android development environment
I reinstalled nodejs, python and jdk using choco as suggested on official docs. Every single packages is installed as well as sdk 23.0.1
I can see my virtual device if I run adb devices USB debugging is activated and it's running android 6.
I setup ANDROID_HOME path in environment variables, I'm using same sdk path as you can see in the picture. I also setup another one for JAVA_HOME and Python.
My PATH looks like this:
I just don't understand what I'm supposed to do. I'm using a surface pro 4, Windows 10. I can run projects using expo. I literally tried everything, restart computer, start cmd using admin, create new virtual devices, uninstall everything and start from scratch, it just don't work.
You have pointed out two issues; first, make sure you have an android emulator running. To do that, you run adb devices and you say you can see you device.
The other issue is with the environment. To make sure your environment is setup properly for android, go to the root of your react-native project. Open the android project using android studio.
All errors with your environment will show up, use the automatic fixes provided by android studio. Clean the project in android studio. Close studio and go back to command line, run react-native run-android
Everything should work now.
When doing react-native start it will intentionally hang at "Loading dependency graph" (its not really hanging, its just waiting to receive build/bundle signals). This is correct. You have to open a second terminal then do react-native run-android.
If you get errors, then cd android in your project folder then run ./gradlew clean, then after that do another react-native start then react-native run-android.
Solution is to delete all java JDK and reinstall v8 / change JAVA_HOME to the new path.
Also changing gradle-wrapper.propertiesfile for each project you want to run
# update gradle to latest version
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4.1-all.zip
Sometimes it dosen't compile with v4 so I have to use v3. React native is definitely confusing.
after install dan update environment JDK now I can install app on my device
I'm trying to create my first react-native app.
I installed expo XDE then I create a new project in this way :
create-react-native-app firstProj
Then I open it in expo XDE and in terminal by exp firstProj
But I get this warning ; And this is what is displayed in the emulator :
Any help is appreciated.
Click the setting button in the left top, then change the "Host" to "LAN"
Restart your project
Follow the below steps to create a new expo app from command line:
create-react-native-app my-app
cd my-app/
npm start
npm run ios / npm run android
In a alternate way you can try Expo XDE interface to create a app and run in your device. Here is a official document for creating and sharing your app across your device. If you are interested with their CLI you can follow the below steps
npm install exp --global
exp init your-project-name
cd your-project-name
exp start
Please check whether you have missed any of the steps from the above, it might help you to fix the issue. You might have missed exp start command.
It helped the following in my case:
Install Genymotion with VirtualBox
SignUp at Genymotion site
Run Genymotion software and !!!SignIn
Close npm prompt program with project and start it again
npm start (in the npm promt window in the project directory)
Close and start Expo app, scan barcode
I noted that when my application runs successfully IpV addresses are identical
exp://10.0.0.124:19000 and
ipconfig -> IPv4 Address. . . . . . . . . . . : 10.0.0.124
In My Case, I did this.
by Using Expo.
Just make sure the laptop and mobile connection with the same network.
Make sure that you are selected Lan on the expo web tab.
Stop the npm Server Running.
Close the App on Mobile Also.
Then Start npm Again.
Now Scan the QR Code if the project is not listed up in the expo recent open project app already.
Or click on the already available in recent opens project on the expo.
Note if Still not working then try same after clearing the recent open in expo app.
I knew that this answer is too late but May it help someone.