ignite: Unable to build new app, errors on running npx react-native run-ios, on Apple M1
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
- npx ignite-cli new foo
- npx react-native run-ios
- 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
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 15 (3 by maintainers)
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-iosinstead of something else… Hoped that helped you and other as it works for me.