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.

Unable to build new app, errors on running npx react-native run-ios, on Apple M1

See original GitHub issue

What’s going on?

I’ve started a new project with the ignite-cli, but I’m unable to make it run on IOS, (I’ve not tried on Android). Although a new React project without boilerplate runs normally. I’m totally lost.

These errors appear after

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 AudioGuidaApp.xcworkspace. Command line invocation: /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -workspace AudioGuidaApp.xcworkspace -configuration Debug -scheme AudioGuidaApp -destination id=9EAD6E26-E4FC-43C5-B85F-0E93EFC30908 User defaults from command line: IDEPackageSupportUseBuiltinSCM = YES

Then at the bottom it says also this:

ld: warning: directory not found for option ‘-L-L/Users/giuseppetrovato/Library/Developer/Xcode/DerivedData/AudioGuidaApp-fsgjgfxaptmvopggqjhkgiulzzac/Build/Products/Debug-iphonesimulator/CocoaAsyncSocket’ ld: library not found for -lCocoaAsyncSocket clang: error: linker command failed with exit code 1 (use -v to see invocation)

objc[41218]: Class AMSupportURLConnectionDelegate is implemented in both ?? (0x1ff380188) and ?? (0x115f302b8). One of the two will be used. Which one is undefined.

objc[41218]: Class AMSupportURLSession is implemented in both ?? (0x1ff3801d8) and ?? (0x115f30308). One of the two will be used. Which one is undefined.

BUILD FAILED **

The following build commands failed: Ld /Users/giuseppetrovato/Library/Developer/Xcode/DerivedData/AudioGuidaApp-fsgjgfxaptmvopggqjhkgiulzzac/Build/Products/Debug-iphonesimulator/AudioGuidaApp.app/AudioGuidaApp normal arm64 (1 failure)


Steps to reproduce

  1. npx ignite-cli new foo
  2. npx react-native run-ios
  3. Build error

npx ignite-cli doctor results:

System platform darwin
arch arm64
cpu 8 cores Apple M1
directory AudioGuidaApp /Users/giuseppetrovato/Desktop/Workspace/AudioGuidaApp

JavaScript (and globally-installed packages) node 16.10.0 /usr/local/bin/node npm 7.24.0 /usr/local/bin/npm
corepack 0.9.0
direflow-cli 3.5.5
ignite-cli 7.6.0
nodemon 2.0.13
npm 7.24.0
parcel 2.0.0
yarn 1.22.11
yarn 1.22.11 /usr/local/bin/yarn

Ignite ignite-cli 7.6.0 /usr/local/bin/ignite
ignite src build /usr/local/lib/node_modules/ignite-cli/build

Android java 1.8.0_292 /usr/bin/java android home - undefined

iOS xcode 12.5.1
cocoapods 1.11.2

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:15 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
M1chaelTrancommented, Nov 30, 2021

This article resolve this issue for me. https://handi.dev/blog/how-run-react-native-on-macbook-m1-apple-silicon

I don’t know how you have done it, but when I try to build it throws the same error

Follow the instruction from step 3 to 7. I found that step 1 and 2 isn’t needed.

If that still doesn’t work, make sure that you’re using Node version 14.x instead of the latest. Also you’re using the npx react-native run-ios instead of something else… Hoped that helped you and other as it works for me.

0reactions
frankcalisecommented, Aug 22, 2022

I’m going to close this issue due to inactivity. However, if this problem still persists and you have updated to the latest version of ignite, please open a new issue stating the problem and the output of npx ignite-cli doctor.

Also, you can check out https://community.infinite.red to get help with us (and a bunch of other RN devs!) directly in Slack.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix “pod install” error in React Native on Mac M1
It's time to run your new app again (also, make sure that XCode is up and running when you restart your React Native...
Read more >
How to Solve React Native Build Failed on M1 Macbook Pro / Air
Solution to Run and Build React Native on M1 Macbook Pro · Set Terminal App to use Rosetta :. Select the app in...
Read more >
Build error of react native run iOS on M1 Macbook
** BUILD FAILED ** The following build commands failed: Ld /Users/USERNAME/Library/Developer/Xcode/DerivedData/ReactNCalisma- ...
Read more >
"react-native run-ios --device" fa… | Apple Developer Forums
The react-native run-ios --device command fails with an error. The app runs on the simulator using the react-native run-ios command without any problem....
Read more >
Setting up the development environment - React Native
Run the following command to create a new React Native project called "AwesomeProject": npm; Yarn. npx create-expo-app AwesomeProject
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