pod installation on my ios folder in my react-native project throws error
Description
After creating a react native project using React Native CLI Quickstart, tried to install pod using arch -x86_64 pod install in the ios folder, that throws the following error:
Auto-linking React Native modules for target MobileApp: RNReanimated and react-native-skia
[Codegen] Generating ./build/generated/ios/React-Codegen.podspec.json
fatal: not a git repository (or any of the parent directories): .git
Analyzing dependencies
――― MARKDOWN TEMPLATE ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
Command
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/bin/pod install
Report
-
What did you do?
-
What did you expect to happen?
-
What happened instead?
Stack
CocoaPods : 1.11.3
Ruby : ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [arm64-darwin21]
RubyGems : 3.3.11
Host : macOS 12.6.1 (21G217)
Xcode : 13.3 (13E5095k)
Git : git version 2.37.0
Ruby lib dir : /opt/homebrew/Cellar/ruby/3.1.2_1/lib
Repositories : trunk - CDN - https://cdn.cocoapods.org/
Plugins
cocoapods-deintegrate : 1.0.5
cocoapods-plugins : 1.0.0
cocoapods-search : 1.0.1
cocoapods-trunk : 1.6.0
cocoapods-try : 1.2.0
Podfile
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
platform :ios, '12.4'
install! 'cocoapods', :deterministic_uuids => false
target 'MobileApp' do
config = use_native_modules!
# Flags change depending on the env values.
flags = get_default_flags()
use_react_native!(
:path => config[:reactNativePath],
# Hermes is now enabled by default. Disable by setting this flag to false.
# Upcoming versions of React Native may rely on get_default_flags(), but
# we make it explicit here to aid in the React Native upgrade process.
:hermes_enabled => true,
:fabric_enabled => flags[:fabric_enabled],
# Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable the next line.
:flipper_configuration => FlipperConfiguration.enabled,
# An absolute path to your application root.
:app_path => "#{Pod::Config.instance.installation_root}/.."
)
target 'MobileAppTests' do
inherit! :complete
# Pods for testing
end
post_install do |installer|
react_native_post_install(
installer,
# Set `mac_catalyst_enabled` to `true` in order to apply patches
# necessary for Mac Catalyst builds
:mac_catalyst_enabled => false
)
__apply_Xcode_12_5_M1_post_install_workaround(installer)
end
end
Error
Nanaimo::Reader::ParseError - [!] Invalid character "\xE2" in unquoted string
# -------------------------------------------
# ENABLE_STRICT_OBJC_MSGSEND = YES;
# ENABLE_TESTABILITY = YES;
565> "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = ”;
^
# GCC_C_LANGUAGE_STANDARD = gnu99;
# GCC_DYNAMIC_NO_PIC = NO;
# -------------------------------------------
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/nanaimo-0.3.0/lib/nanaimo/reader.rb:284:in `raise_parser_error'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/nanaimo-0.3.0/lib/nanaimo/reader.rb:150:in `parse_string'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/nanaimo-0.3.0/lib/nanaimo/reader.rb:140:in `parse_object'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/nanaimo-0.3.0/lib/nanaimo/reader.rb:193:in `parse_dictionary'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/nanaimo-0.3.0/lib/nanaimo/reader.rb:132:in `parse_object'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/nanaimo-0.3.0/lib/nanaimo/reader.rb:193:in `parse_dictionary'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/nanaimo-0.3.0/lib/nanaimo/reader.rb:132:in `parse_object'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/nanaimo-0.3.0/lib/nanaimo/reader.rb:193:in `parse_dictionary'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/nanaimo-0.3.0/lib/nanaimo/reader.rb:132:in `parse_object'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/nanaimo-0.3.0/lib/nanaimo/reader.rb:193:in `parse_dictionary'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/nanaimo-0.3.0/lib/nanaimo/reader.rb:132:in `parse_object'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/nanaimo-0.3.0/lib/nanaimo/reader.rb:107:in `parse!'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/xcodeproj-1.21.0/lib/xcodeproj/plist.rb:27:in `read_from_path'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/xcodeproj-1.21.0/lib/xcodeproj/project.rb:211:in `initialize_from_file'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/xcodeproj-1.21.0/lib/xcodeproj/project.rb:113:in `open'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:1190:in `block (2 levels) in inspect_targets_to_integrate'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:1189:in `each'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:1189:in `block in inspect_targets_to_integrate'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/user_interface.rb:64:in `section'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:1184:in `inspect_targets_to_integrate'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:106:in `analyze'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:416:in `analyze'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:241:in `block in resolve_dependencies'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/user_interface.rb:64:in `section'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:240:in `resolve_dependencies'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:161:in `install!'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/command/install.rb:52:in `run'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/claide-1.1.0/lib/claide/command.rb:334:in `run'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/command.rb:52:in `run'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/bin/pod:55:in `<top (required)>'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/bin/pod:25:in `load'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/bin/pod:25:in `<main>'
――― TEMPLATE END ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
[!] Oh no, an error occurred.
Search for existing GitHub issues similar to yours: https://github.com/CocoaPods/CocoaPods/search?q=%5B%21%5D+Invalid+character+%22%5CxE2%22+in+unquoted+string%0A+++%23++-------------------------------------------%0A+++%23++%09%09%09%09ENABLE_STRICT_OBJC_MSGSEND+%3D+YES%3B%0A+++%23++%09%09%09%09ENABLE_TESTABILITY+%3D+YES%3B%0A565%3E++%09%09%09%09%22EXCLUDED_ARCHS%5Bsdk%3Diphonesimulator%2A%5D%22+%3D+%E2%80%9D%3B%0A++++++%09%09%09%09+++++++++++++++++++++++++++++++++++++++++%5E%0A+++%23++%09%09%09%09GCC_C_LANGUAGE_STANDARD+%3D+gnu99%3B%0A+++%23++%09%09%09%09GCC_DYNAMIC_NO_PIC+%3D+NO%3B%0A+++%23++-------------------------------------------%0A&type=Issues
If none exists, create a ticket, with the template displayed above, on: https://github.com/CocoaPods/CocoaPods/issues/new
Be sure to first read the contributing guide for details on how to properly submit a ticket: https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md
Don't forget to anonymize any private data!
Looking for related issues on cocoapods/cocoapods... Searching for inspections failed: undefined method `map' for nil:NilClass
report.issues = results['items'].map { |item| Issue.new(item) }
^^^^
Version
0.69.6
Output of npx react-native info
info Fetching system and libraries information... System: OS: macOS 12.6.1 CPU: (8) arm64 Apple M1 Pro Memory: 431.91 MB / 16.00 GB Shell: 5.8.1 - /bin/zsh Binaries: Node: 16.15.1 - /usr/local/bin/node Yarn: 1.22.19 - /usr/local/bin/yarn npm: 8.11.0 - /usr/local/bin/npm Watchman: 2022.10.24.00 - /opt/homebrew/bin/watchman Managers: CocoaPods: 1.11.3 - /opt/homebrew/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.4, iOS 15.4, macOS 12.3, tvOS 15.4, watchOS 8.5 Android SDK: Not Found IDEs: Android Studio: Not Found Xcode: 13.3/13E5095k - /usr/bin/xcodebuild Languages: Java: Not Found npmPackages: @react-native-community/cli: Not Found react: 18.0.0 => 18.0.0 react-native: 0.69.6 => 0.69.6 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found
Steps to reproduce
Create a react native project using react native cli quickstart (npx react-native init ProjectName), go to ios folder and use arch -x86_64 pod install / pod install.
Snack, code example, screenshot, or link to a repository
arch -x86_64 pod install
Auto-linking React Native modules for target MobileApp: RNReanimated and react-native-skia
[Codegen] Generating ./build/generated/ios/React-Codegen.podspec.json
fatal: not a git repository (or any of the parent directories): .git
Analyzing dependencies
――― MARKDOWN TEMPLATE ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
Command
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/bin/pod install
Report
-
What did you do?
-
What did you expect to happen?
-
What happened instead?
Stack
CocoaPods : 1.11.3
Ruby : ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [arm64-darwin21]
RubyGems : 3.3.11
Host : macOS 12.6.1 (21G217)
Xcode : 13.3 (13E5095k)
Git : git version 2.37.0
Ruby lib dir : /opt/homebrew/Cellar/ruby/3.1.2_1/lib
Repositories : trunk - CDN - https://cdn.cocoapods.org/
Plugins
cocoapods-deintegrate : 1.0.5
cocoapods-plugins : 1.0.0
cocoapods-search : 1.0.1
cocoapods-trunk : 1.6.0
cocoapods-try : 1.2.0
Podfile
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
platform :ios, '12.4'
install! 'cocoapods', :deterministic_uuids => false
target 'MobileApp' do
config = use_native_modules!
# Flags change depending on the env values.
flags = get_default_flags()
use_react_native!(
:path => config[:reactNativePath],
# Hermes is now enabled by default. Disable by setting this flag to false.
# Upcoming versions of React Native may rely on get_default_flags(), but
# we make it explicit here to aid in the React Native upgrade process.
:hermes_enabled => true,
:fabric_enabled => flags[:fabric_enabled],
# Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable the next line.
:flipper_configuration => FlipperConfiguration.enabled,
# An absolute path to your application root.
:app_path => "#{Pod::Config.instance.installation_root}/.."
)
target 'MobileAppTests' do
inherit! :complete
# Pods for testing
end
post_install do |installer|
react_native_post_install(
installer,
# Set `mac_catalyst_enabled` to `true` in order to apply patches
# necessary for Mac Catalyst builds
:mac_catalyst_enabled => false
)
__apply_Xcode_12_5_M1_post_install_workaround(installer)
end
end
Error
Nanaimo::Reader::ParseError - [!] Invalid character "\xE2" in unquoted string
# -------------------------------------------
# ENABLE_STRICT_OBJC_MSGSEND = YES;
# ENABLE_TESTABILITY = YES;
565> "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = ”;
^
# GCC_C_LANGUAGE_STANDARD = gnu99;
# GCC_DYNAMIC_NO_PIC = NO;
# -------------------------------------------
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/nanaimo-0.3.0/lib/nanaimo/reader.rb:284:in `raise_parser_error'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/nanaimo-0.3.0/lib/nanaimo/reader.rb:150:in `parse_string'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/nanaimo-0.3.0/lib/nanaimo/reader.rb:140:in `parse_object'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/nanaimo-0.3.0/lib/nanaimo/reader.rb:193:in `parse_dictionary'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/nanaimo-0.3.0/lib/nanaimo/reader.rb:132:in `parse_object'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/nanaimo-0.3.0/lib/nanaimo/reader.rb:193:in `parse_dictionary'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/nanaimo-0.3.0/lib/nanaimo/reader.rb:132:in `parse_object'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/nanaimo-0.3.0/lib/nanaimo/reader.rb:193:in `parse_dictionary'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/nanaimo-0.3.0/lib/nanaimo/reader.rb:132:in `parse_object'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/nanaimo-0.3.0/lib/nanaimo/reader.rb:193:in `parse_dictionary'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/nanaimo-0.3.0/lib/nanaimo/reader.rb:132:in `parse_object'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/nanaimo-0.3.0/lib/nanaimo/reader.rb:107:in `parse!'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/xcodeproj-1.21.0/lib/xcodeproj/plist.rb:27:in `read_from_path'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/xcodeproj-1.21.0/lib/xcodeproj/project.rb:211:in `initialize_from_file'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/xcodeproj-1.21.0/lib/xcodeproj/project.rb:113:in `open'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:1190:in `block (2 levels) in inspect_targets_to_integrate'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:1189:in `each'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:1189:in `block in inspect_targets_to_integrate'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/user_interface.rb:64:in `section'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:1184:in `inspect_targets_to_integrate'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:106:in `analyze'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:416:in `analyze'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:241:in `block in resolve_dependencies'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/user_interface.rb:64:in `section'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:240:in `resolve_dependencies'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:161:in `install!'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/command/install.rb:52:in `run'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/claide-1.1.0/lib/claide/command.rb:334:in `run'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/command.rb:52:in `run'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/bin/pod:55:in `<top (required)>'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/bin/pod:25:in `load'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/bin/pod:25:in `<main>'
――― TEMPLATE END ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
[!] Oh no, an error occurred.
Search for existing GitHub issues similar to yours: https://github.com/CocoaPods/CocoaPods/search?q=%5B%21%5D+Invalid+character+%22%5CxE2%22+in+unquoted+string%0A+++%23++-------------------------------------------%0A+++%23++%09%09%09%09ENABLE_STRICT_OBJC_MSGSEND+%3D+YES%3B%0A+++%23++%09%09%09%09ENABLE_TESTABILITY+%3D+YES%3B%0A565%3E++%09%09%09%09%22EXCLUDED_ARCHS%5Bsdk%3Diphonesimulator%2A%5D%22+%3D+%E2%80%9D%3B%0A++++++%09%09%09%09+++++++++++++++++++++++++++++++++++++++++%5E%0A+++%23++%09%09%09%09GCC_C_LANGUAGE_STANDARD+%3D+gnu99%3B%0A+++%23++%09%09%09%09GCC_DYNAMIC_NO_PIC+%3D+NO%3B%0A+++%23++-------------------------------------------%0A&type=Issues
If none exists, create a ticket, with the template displayed above, on: https://github.com/CocoaPods/CocoaPods/issues/new
Be sure to first read the contributing guide for details on how to properly submit a ticket: https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md
Don't forget to anonymize any private data!
Looking for related issues on cocoapods/cocoapods... Searching for inspections failed: undefined method `map' for nil:NilClass
report.issues = results['items'].map { |item| Issue.new(item) }
^^^^
hey, try bundle install at the root of project then npx pod-install or pod install (inside IOS directory).
Create a react native project using react native cli quickstart (npx react-native init ProjectName), go to ios folder and use arch -x86_64 pod install / pod install.
This is not consistent with your error message:
Auto-linking React Native modules for target MobileApp: RNReanimated and react-native-skia
RNReanimated and react-native-skia are not part of the default app template. I'm closing this as I believe it's unrelated to React Native. Please open issues against those two projects and get back to use if this is confirmed to be a React Native issue.