Closed LuongTruong closed 2 hours ago
That's just the error code, the actual error log is in the Issues section by clicking on the error.
If you're only having these issues when building via Xcode, and can successfully build from the example folder with `npm build:ios' from the terminal, the following may help, assuming it's the same problem I had where Xcode can't find npx:
export PATH="$PATH:$(npm bin -g)"
Hello @mariojose96
I tried to run the build:ios
in package.json
but it runs like forever.
I follow your action but still receive the error
- In Xcode go to Product > Scheme > Edit Scheme
- Select the “Build” tab on the left
- In the “Pre-actions” and “Post-actions” sections, add the following line to set the correct path for npx:
export PATH="$PATH:$(npm bin -g)
- Try to build again
Please take a look at the image for more information. I also select the error message, but there is no more information for me to investigate.
Hey @LuongTruong ,
I can reproduce the empty log as well in a new react-native module project using this command: npx create-react-native-library@latest react-native-awesome-module
. But changing the build settings as suggested above solved it for me.
There's a good chance that it's just not grabbing the global npx path for you. I can see above that your path would resolve to "/usr/local/bin". Just export to that path directly with this command export PATH="$PATH:/usr/local/bin"
.
Your build settings Pre-actions should now look like this:
Add export PATH="$PATH:/usr/local/bin"
to Post-Actions too, just to be sure.
Hey @mariojose96 , thanks for the comment. It helps me to build the app successfully.
I am closing the ticket since the issue is resolved.
Description
npx create-react-native-library@0.41.2 RNExample
yarn
to install node_modulespod install
to install PodsAs a result, I receive the error message: "exited with status code 127"
Packages
Selected options
I created:
Link to repro
Create a new library using the version 0.41.2
Environment
System: OS: macOS 15.0 CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz Memory: 164.05 MB / 32.00 GB Shell: version: "5.9" path: /bin/zsh Binaries: Node: version: 20.12.2 path: /usr/local/bin/node Yarn: version: 3.6.1 path: /usr/local/bin/yarn npm: version: 10.8.1 path: /usr/local/bin/npm Watchman: version: 2024.07.01.00 path: /usr/local/bin/watchman Managers: CocoaPods: version: 1.15.2 path: /usr/local/bin/pod SDKs: iOS SDK: Platforms: