react-native icon indicating copy to clipboard operation
react-native copied to clipboard

React native 0.71.11, not building ios on MAC M1

Open Othman2001 opened this issue 2 years ago • 2 comments

Description

so i am trying to react native 0.72 in my laptop mac m1 air 2020 i use this command to create React app

npx react-native init AwesomeProject

when i tried to build the app in xcode i get this error 'fbreactnativespec/fbreactnativespec.h' file not found i can't understand this error however i tried to make pod install but it didn't work also

React Native Version

0.71.10

Output of npx react-native info

error: unknown command 'info' (Did you mean init?)

Steps to reproduce

clone the repo run yarn install cd ios pod install yarn ios or open eAwesomeProejct.woksplace in xcode and build the app

Snack, code example, screenshot, or link to a repository

https://github.com/Othman2001/AwesomeProject

Othman2001 avatar Jun 14 '23 15:06 Othman2001

Hi @Othman2001,

Are you sure that you're trying to build react native 72 ? With the following command npx react-native init AwesomeProject, you're generating a project with the last stable version, ie. 71.11.

In addition, in the description, you specified the 0.71.10 version.

EDIT : On the github repository that you provide, you're on the react native version 0.71.10, so please change the title of the issue

rvasseur31 avatar Jun 15 '23 06:06 rvasseur31

@rvasseur31 sorry, yes i am generating react native app with version 0.71.11 and i try to build the app in xcode and i get this error 'FBReactNativeSpec/FBReactNativeSpec.h' file not found in RCTSettingsManger.mm my os is : mac os venture

Othman2001 avatar Jun 15 '23 08:06 Othman2001

@Othman2001 I was able to build your project without issue.

You mentioned pod install didn't work, did you run this from the ios directory?

It may help to clear our your node_modules and ios/Pods and try again from a clean starting point:

rm -rf node_modules
rm -rd ios/Pods

yarn install
bundle exec pod install --repo-update --clean-install --project-directory=./ios

yarn ios

levibuzolic avatar Jun 22 '23 12:06 levibuzolic

i can't understand this error however i tried to make pod install but it didn't work also

pod install is a requirement to build the app. So if it failed, running yarn ios will also fail. You should share the error message you got when you run pod install @Othman2001

cortinico avatar Jun 23 '23 10:06 cortinico

Screenshot 2023-06-23 at 3 53 21 PM

Gauravprakash avatar Jun 26 '23 08:06 Gauravprakash

What's the solution here i tried multiple times by cleaning caching folder and removing pods directory

Gauravprakash avatar Jun 26 '23 08:06 Gauravprakash

The path that’s trying to be accessed in that error message looks incorrect. Notice the “packages” directory which should be “node_modules”.

This doesn’t appear to be an issue with your project, because I was able to build and run it without any issue. This may be something specific to your Ruby environment or maybe your cocoa pods setup. Without access to your computer it’s difficult to diagnose.

levibuzolic avatar Jun 26 '23 08:06 levibuzolic

Same as @levibuzolic, I was able to build the ios app. Note that I am using :

➜ ruby -v
ruby 2.6.10p210 (2022-04-12 revision 67958) [universal.arm64e-darwin22]

and

➜ pod --version   
1.12.1

rvasseur31 avatar Jun 26 '23 08:06 rvasseur31

Can we look into using remote access @levibuzolic and @rvasseur31

Gauravprakash avatar Jun 26 '23 09:06 Gauravprakash

System: OS: macOS 13.1 CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz Memory: 24.04 MB / 16.00 GB Shell: 5.8.1 - /bin/zsh Binaries: Node: 16.15.1 - ~/.nvm/versions/node/v16.15.1/bin/node Yarn: 1.22.17 - /usr/local/bin/yarn npm: 9.1.3 - ~/.nvm/versions/node/v16.15.1/bin/npm Watchman: Not Found Managers: CocoaPods: 1.10.1 - /Users/gauravprakash/.rvm/gems/ruby-2.7.5/bin/pod SDKs: iOS SDK: Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1 Android SDK: Not Found IDEs: Android Studio: 2022.2 AI-222.4459.24.2221.10121639 Xcode: 14.2/14C18 - /usr/bin/xcodebuild Languages: Java: Not Found npmPackages: @react-native-community/cli: Not Found react: Not Found react-native: Not Found react-native-macos: Not Found npmGlobalPackages: react-native: Not Found

Gauravprakash avatar Jun 26 '23 09:06 Gauravprakash

@levibuzolic and @rvasseur31 pls share any update after checking configuration what may be issue ?

Gauravprakash avatar Jun 28 '23 07:06 Gauravprakash

Here is my npx react-native info command result :

➜ npx react-native info                    
info Fetching system and libraries information...
System:
    OS: macOS 13.4
    CPU: (8) arm64 Apple M1
    Memory: 75.02 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.14.0 - ~/.nvm/versions/node/v18.14.0/bin/node
    Yarn: 1.22.19 - ~/.yarn/bin/yarn
    npm: 9.3.1 - ~/.nvm/versions/node/v18.14.0/bin/npm
    Watchman: 2023.06.08.00 - /opt/homebrew/bin/watchman
  Managers:
    CocoaPods: 1.12.1 - /opt/homebrew/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 22.4, iOS 16.4, macOS 13.3, tvOS 16.4, watchOS 9.4
    Android SDK:
      API Levels: 33, 34
      Build Tools: 30.0.3, 33.0.0, 34.0.0
      System Images: android-34 | Google APIs ARM 64 v8a, android-34 | Google Play ARM 64 v8a
      Android NDK: 23.1.7779620
  IDEs:
    Android Studio: Electric Eel 2022.1.1 Patch 2 Electric Eel 2022.1.1 Patch 2
    Xcode: 14.3.1/14E300c - /usr/bin/xcodebuild
  Languages:
    Java: 11.0.18 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 18.2.0 => 18.2.0 
    react-native: 0.71.8 => 0.71.8 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Try to update the node.js, cocoapods, and xcode version

rvasseur31 avatar Jun 28 '23 07:06 rvasseur31

This issue is waiting for author's feedback since 24 days. Please provide the requested feedback or this will be closed in 7 days.

github-actions[bot] avatar Jul 23 '23 05:07 github-actions[bot]

This issue was closed because it has been stalled for 7 days with no activity.

github-actions[bot] avatar Jul 30 '23 05:07 github-actions[bot]

This issue was closed because the author hasn't provided the requested feedback after 7 days.

github-actions[bot] avatar Jul 30 '23 05:07 github-actions[bot]