How to make sure expo knows SDK is installed in my laptop - sdk

I am currently making a react native app and have installed expo but I am getting the error below in the image. I have SDK(29) in my device but how do I make sure that expo knows it.

You don't seem to have made Expo a project.
Did you ran react-native init ??? If yes, it is not an Expo project. it is only react-native project
To make sure that Expo is installed properly: Verify that the
installation was successful by running expo whoami.
If you want an Expo project, run the following command.
expo init AwesomeProject
cd AwesomeProject
npm start # you can also use: expo start
The project you received from Git seems to be a React-native project.
You can try this command.
cd gitproject
npm install
cd ios
pod install
cd ..
npx react-native run-ios or run-android

In the terminal run
expo --version
if installed it will return the version like
5.2.0
else you will get
'expo' is not recognized as an internal or external command,
operable program or batch file.

Related

failure to install cocoapods when initializing a react-native project

I'm currently running macOS Catalina 10.15.6 and XCode 12.4. I'm trying to create a react native ios app and I'm on the command line running "react-native init Focus" where Focus is the name of my app.
When setting up the app, I get the error "(node:11768) UnhandledPromiseRejectionWarning: Error: Failed to install CocoaPods dependencies for iOS project, which is required by this template"
I try to run "cd ./Focus/ios && pod install" which fails, and I have also tried "sudo gem install cocoapods" and "brew install cocoapods" which all fail.
I cannot get past this setup phase of the project.
Fire below code for the setup Project.
npx react-native init ( Your Project Name)
Above code set up your project. And then open your project in IDE which you use for business coding and follow these steps.
Start your react native server by hit the following code
npx react-native start
For the run in iOS do the following steps
cd ios
pod install
cd ..
npx react-native run-ios
Or also you can directly run from Xcode after the third step. You do not need to hit the 4 setup

Setting up react-native development environment at M1 Macbook

Setting
os : Big Sur 11.1
homebrew : 2.7.1
node : 14.15.4
watchman : 4.9.0
Xcode : 12.3
cocoapods : 1.8.4
npx react-native init AwesomeProject
cd AwesomeProject
npx react-native start
cd AwesomeProject
npx react-native run-ios
result(err)
enter image description here
error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening AwesomeProject.xcworkspace.
until npx react-native start there's no error
but npx react-native run-ios doesn't work.
I don't get what the problem is. Is Xcode version too high? please help
and how can I build AwesomeProject with Xcode app?. I tried but it failed too.
go to applications and right click on Xcode.app. select the get info. fill the check box of open using Rosseta.if yo want to run iOS with terminal do the steps for terminal.app as well.

node_modules error when running a react-native app

I'm trying to run a react native app, but upon doing react-native run-ios and opening the app in the simulator, I'm getting the following error:
I'm tried running npm install to no avail. How to fix this error?
install this package:
npm i #react-native-community/cli

Failed IOS Build React Native

I downloaded a branch from my github project and when I run the simulator, it runs but the app displays this error.
I have already tried removing the build folder and re running it and I have done npm install when the error displays and running "react-native run-ios". I don't know what to do.
Open additional terminal in the same folder. Run this command.
react-native start --reset-cache
Once the package manager is ready, go back to your first terminal and run your app again.
react-native run-ios

React native runnig error on ios device

I am trying to run react native code to iphone, however it shows the following message.
The following code runs on Android normally, and on expo fine too, but it does not run on physical device.
Please help me.
E:\reactnative\cd webview
E:\reactnative\webview>react-native run-ios
Scanning folders for symlinks in E:\reactnative\webview\node_modules (38ms)
Found Xcode project webview.xcodeproj
spawnSync xcrun ENOENT
E:\reactnative\webview>
If you are using react-native-cli version 0.1.7 then you could either
Rollback to 0.1.7 (do not use '--verbose' argument)
npm install -g react-native-cli#0.1.7
or try it with the latest which might be fixed
npm uninstall -g react-native-cli
npm install -g react-native-cli
There was a regression in 0.1.8, reported here: https://github.com/facebook/react-native/issues/5169

Resources