question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

React Native's initial project doesn't run on IOS.

See original GitHub issue

Description

I created a new project using the command npx react-native init MyApp --template react-native-template-typescript. When i run npx react-native run-ios, it gives me below error.

** BUILD FAILED **
The following build commands failed:
        PhaseScriptExecution [CP-User]\ Generate\ Specs /Users/macbookpro/Library/Developer/Xcode/DerivedData/MyApp-gvadqhjqjqogdegfwqsahxwqnkps/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FBReactNativeSpec.build/Script-8C01FEA837F8EC37C13D05D97D3F6C1B.sh
(1 failure)

React Native version:

System: OS: macOS 11.2.3 CPU: (4) x64 Intel® Core™ i5-7360U CPU @ 2.30GHz Memory: 58.32 MB / 8.00 GB Shell: 5.8 - /bin/zsh Binaries: Node: 14.16.0 - /usr/local/bin/node Yarn: Not Found npm: 6.14.11 - /usr/local/bin/npm Watchman: Not Found Managers: CocoaPods: 1.10.1 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: iOS 14.4, DriverKit 20.2, macOS 11.1, tvOS 14.3, watchOS 7.2 Android SDK: Not Found IDEs: Android Studio: 4.0 AI-193.6911.18.40.6514223 Xcode: 12.4/12D4e - /usr/bin/xcodebuild Languages: Java: 14.0.1 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: 17.0.1 => 17.0.1 react-native: 0.64.0 => 0.64.0 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:14
  • Comments:41 (2 by maintainers)

github_iconTop GitHub Comments

82reactions
sumanbhattaraicommented, Apr 1, 2021

Removing

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion

from ~/.bash_profile .

AND

Commenting out all the code from project/node_modules/react-native/scripts/find-node.sh helped to solve this issue.

39reactions
imkrunalcommented, Mar 27, 2021

I am facing the same issue with yarn ios but if I build the app from Xcode it works.

Read more comments on GitHub >

github_iconTop Results From Across the Web

React Native initial project doesn't run for IOS - Stack Overflow
I created a new project using the command npx react-native init MyApp --template react-native-template-typescript . ... When i run npx react- ...
Read more >
Troubleshooting - React Native
These are some common issues you may run into while setting up React Native. If you encounter something that is not listed here, ......
Read more >
5 common errors found in a React Native app (using Expo)
In the first phase of our app, everything was running smoothly, as we were just testing everything on IOS (we didn't have plans...
Read more >
How Run and Test React Native / Expo On Your Apple iOS ...
Note: If you are on MacOS and Expo CLI gets stuck on Starting project at <path> , you may need to install Watchman...
Read more >
What Is React Native? Complex Guide for 2022 - Netguru
React Native was first released by Facebook as an open-source project in 2015. ... Knowledge of React won't be enough for iOS and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found