-
Notifications
You must be signed in to change notification settings - Fork 24.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
React Native not building on Xcode 12.5 #31592
Comments
@dulmandakh how am i supposed to test that PR? do I have to init a new RN project and apply your changes to my node modules and try? |
Edit node_modules/react-native/scripts/find-node.sh and append content of the PR. And see if it solves your issue. Thanks |
@dulmandakh I tried it but doesn't work:
Looking your PR it seems that what you are doing is just checking if /opt/homebrew/bin exists and adding it to the path. I don't know if this is related with the issue I am facing. Anyway, I didn't install node using homebrew (when I bought the mm was impossible) and have installed manually:
|
Summary: Homebrew on M1 installs executable binaries in **/opt/homebrew/bin** (See https://brew.sh/2021/02/05/homebrew-3.0.0/), and FBReactNativeSpec.build is failing because it couldn't find node. This PR changes find-node.sh script to add /opt/homebrew/bin into $PATH. The way **react.gradle** trying to execute node is not using user environment variables, but system defaults, so it couldn't find it. I removed node execution, and hard coded cli path in parity with iOS https://github.com/facebook/react-native/blob/d1ab03235cb4b93304150878d2b9057ab45bba77/scripts/react-native-xcode.sh#L106 Fixes #31621 #31592 ## Changelog [General] [Changed] - find-node.sh supports Homebrew on M1 Pull Request resolved: #31622 Test Plan: On M1, create a RN project and it'll fail to build iOS app. Apply the patch, and build will succeed. Reviewed By: ShikaSD Differential Revision: D28808206 Pulled By: hramos fbshipit-source-id: 8b313b6685462a15e67d99c61a0202d17fece1ec
Summary: Homebrew on M1 installs executable binaries in **/opt/homebrew/bin** (See https://brew.sh/2021/02/05/homebrew-3.0.0/), and FBReactNativeSpec.build is failing because it couldn't find node. This PR changes find-node.sh script to add /opt/homebrew/bin into $PATH. The way **react.gradle** trying to execute node is not using user environment variables, but system defaults, so it couldn't find it. I removed node execution, and hard coded cli path in parity with iOS https://github.com/facebook/react-native/blob/d1ab03235cb4b93304150878d2b9057ab45bba77/scripts/react-native-xcode.sh#L106 Fixes #31621 #31592 ## Changelog [General] [Changed] - find-node.sh supports Homebrew on M1 Pull Request resolved: #31622 Test Plan: On M1, create a RN project and it'll fail to build iOS app. Apply the patch, and build will succeed. Reviewed By: ShikaSD Differential Revision: D28808206 Pulled By: hramos fbshipit-source-id: 8b313b6685462a15e67d99c61a0202d17fece1ec # Conflicts: # scripts/find-node.sh
Summary: Homebrew on M1 installs executable binaries in **/opt/homebrew/bin** (See https://brew.sh/2021/02/05/homebrew-3.0.0/), and FBReactNativeSpec.build is failing because it couldn't find node. This PR changes find-node.sh script to add /opt/homebrew/bin into $PATH. The way **react.gradle** trying to execute node is not using user environment variables, but system defaults, so it couldn't find it. I removed node execution, and hard coded cli path in parity with iOS https://github.com/facebook/react-native/blob/d1ab03235cb4b93304150878d2b9057ab45bba77/scripts/react-native-xcode.sh#L106 Fixes facebook#31621 facebook#31592 ## Changelog [General] [Changed] - find-node.sh supports Homebrew on M1 Pull Request resolved: facebook#31622 Test Plan: On M1, create a RN project and it'll fail to build iOS app. Apply the patch, and build will succeed. Reviewed By: ShikaSD Differential Revision: D28808206 Pulled By: hramos fbshipit-source-id: 8b313b6685462a15e67d99c61a0202d17fece1ec
Summary: Homebrew on M1 installs executable binaries in **/opt/homebrew/bin** (See https://brew.sh/2021/02/05/homebrew-3.0.0/), and FBReactNativeSpec.build is failing because it couldn't find node. This PR changes find-node.sh script to add /opt/homebrew/bin into $PATH. The way **react.gradle** trying to execute node is not using user environment variables, but system defaults, so it couldn't find it. I removed node execution, and hard coded cli path in parity with iOS https://github.com/facebook/react-native/blob/d1ab03235cb4b93304150878d2b9057ab45bba77/scripts/react-native-xcode.sh#L106 Fixes facebook#31621 facebook#31592 ## Changelog [General] [Changed] - find-node.sh supports Homebrew on M1 Pull Request resolved: facebook#31622 Test Plan: On M1, create a RN project and it'll fail to build iOS app. Apply the patch, and build will succeed. Reviewed By: ShikaSD Differential Revision: D28808206 Pulled By: hramos fbshipit-source-id: 8b313b6685462a15e67d99c61a0202d17fece1ec
Summary: Homebrew on M1 installs executable binaries in **/opt/homebrew/bin** (See https://brew.sh/2021/02/05/homebrew-3.0.0/), and FBReactNativeSpec.build is failing because it couldn't find node. This PR changes find-node.sh script to add /opt/homebrew/bin into $PATH. The way **react.gradle** trying to execute node is not using user environment variables, but system defaults, so it couldn't find it. I removed node execution, and hard coded cli path in parity with iOS https://github.com/facebook/react-native/blob/d1ab03235cb4b93304150878d2b9057ab45bba77/scripts/react-native-xcode.sh#L106 Fixes #31621 #31592 ## Changelog [General] [Changed] - find-node.sh supports Homebrew on M1 Pull Request resolved: #31622 Test Plan: On M1, create a RN project and it'll fail to build iOS app. Apply the patch, and build will succeed. Reviewed By: ShikaSD Differential Revision: D28808206 Pulled By: hramos fbshipit-source-id: 8b313b6685462a15e67d99c61a0202d17fece1ec
Summary: Homebrew on M1 installs executable binaries in **/opt/homebrew/bin** (See https://brew.sh/2021/02/05/homebrew-3.0.0/), and FBReactNativeSpec.build is failing because it couldn't find node. This PR changes find-node.sh script to add /opt/homebrew/bin into $PATH. The way **react.gradle** trying to execute node is not using user environment variables, but system defaults, so it couldn't find it. I removed node execution, and hard coded cli path in parity with iOS https://github.com/facebook/react-native/blob/d1ab03235cb4b93304150878d2b9057ab45bba77/scripts/react-native-xcode.sh#L106 Fixes facebook#31621 facebook#31592 [General] [Changed] - find-node.sh supports Homebrew on M1 Pull Request resolved: facebook#31622 Test Plan: On M1, create a RN project and it'll fail to build iOS app. Apply the patch, and build will succeed. Reviewed By: ShikaSD Differential Revision: D28808206 Pulled By: hramos fbshipit-source-id: 8b313b6685462a15e67d99c61a0202d17fece1ec
Summary: Homebrew on M1 installs executable binaries in **/opt/homebrew/bin** (See https://brew.sh/2021/02/05/homebrew-3.0.0/), and FBReactNativeSpec.build is failing because it couldn't find node. This PR changes find-node.sh script to add /opt/homebrew/bin into $PATH. The way **react.gradle** trying to execute node is not using user environment variables, but system defaults, so it couldn't find it. I removed node execution, and hard coded cli path in parity with iOS https://github.com/facebook/react-native/blob/d1ab03235cb4b93304150878d2b9057ab45bba77/scripts/react-native-xcode.sh#L106 Fixes facebook#31621 facebook#31592 ## Changelog [General] [Changed] - find-node.sh supports Homebrew on M1 Pull Request resolved: facebook#31622 Test Plan: On M1, create a RN project and it'll fail to build iOS app. Apply the patch, and build will succeed. Reviewed By: ShikaSD Differential Revision: D28808206 Pulled By: hramos fbshipit-source-id: 8b313b6685462a15e67d99c61a0202d17fece1ec
Running into this issue as well on an M1 Mac, however I'm also using nvm to manage my node version. This was on a fresh project created using package.json
|
Can you try bumping |
I'm using the same mac mini. I just recreated a new project:
package.json:
yarn ios works fine. Xcode doesn't I openned ios/AwesomeProject.xcworkspace
Following the steps I suggested in #31592 (comment) works. So, the issue is still there. |
With all respect, you linked to a closed issue and to an issue that has nothing to do with this. IMO, the default template should work fine after a clean install |
Neither of those are closed?
Which one? |
Bumping to latest still doesn't work. I also followed the steps outlined #31480 (comment) and then here, and |
Summary: Homebrew on M1 installs executable binaries in **/opt/homebrew/bin** (See https://brew.sh/2021/02/05/homebrew-3.0.0/), and FBReactNativeSpec.build is failing because it couldn't find node. This PR changes find-node.sh script to add /opt/homebrew/bin into $PATH. The way **react.gradle** trying to execute node is not using user environment variables, but system defaults, so it couldn't find it. I removed node execution, and hard coded cli path in parity with iOS https://github.com/facebook/react-native/blob/d1ab03235cb4b93304150878d2b9057ab45bba77/scripts/react-native-xcode.sh#L106 Fixes facebook#31621 facebook#31592 [General] [Changed] - find-node.sh supports Homebrew on M1 Pull Request resolved: facebook#31622 Test Plan: On M1, create a RN project and it'll fail to build iOS app. Apply the patch, and build will succeed. Reviewed By: ShikaSD Differential Revision: D28808206 Pulled By: hramos fbshipit-source-id: 8b313b6685462a15e67d99c61a0202d17fece1ec
Summary: Homebrew on M1 installs executable binaries in **/opt/homebrew/bin** (See https://brew.sh/2021/02/05/homebrew-3.0.0/), and FBReactNativeSpec.build is failing because it couldn't find node. This PR changes find-node.sh script to add /opt/homebrew/bin into $PATH. The way **react.gradle** trying to execute node is not using user environment variables, but system defaults, so it couldn't find it. I removed node execution, and hard coded cli path in parity with iOS https://github.com/facebook/react-native/blob/d1ab03235cb4b93304150878d2b9057ab45bba77/scripts/react-native-xcode.sh#L106 Fixes facebook#31621 facebook#31592 [General] [Changed] - find-node.sh supports Homebrew on M1 Pull Request resolved: facebook#31622 Test Plan: On M1, create a RN project and it'll fail to build iOS app. Apply the patch, and build will succeed. Reviewed By: ShikaSD Differential Revision: D28808206 Pulled By: hramos fbshipit-source-id: 8b313b6685462a15e67d99c61a0202d17fece1ec
Please provide all the information requested. Issues that do not follow this format are likely to stall.
Description
Created a RN blank project on a new mac mini m1 apple silicon. SO: Big Sur 11.3.1
After that, yarn ios works fine. The app is launched correctly on the ios simulator.
if I open Xcode and try to build, I get this error:
Showing All Messages
/Users/myusername/Proyectos/AwesomeProject/ios/AwesomeProject.xcodeproj The linked library 'libPods-AwesomeProject.a' is missing one or more architectures required by this target: arm64.
React Native version:
Steps To Reproduce
Provide a detailed list of steps that reproduce the issue.
Expected Results
The app should work when yarn ios and when running in xcode
Snack, code example, screenshot, or link to a repository:
Just the default code created by
npx react-native init AwesomeProject
The text was updated successfully, but these errors were encountered: