在本地安装pod安装失败

时间:2020-07-22 20:22:51

标签: react-native cocoapods

从库的根项目中运行pod安装会给我以下错误:-

➜ app git:(master) ✗ pod install                                 
    WARNING: CocoaPods requires your terminal to be using UTF-8 encoding.
    Consider adding the following to ~/.profile:

    export LANG=en_US.UTF-8
    
[!] No `Podfile' found in the project directory.

当我从 / ios内部运行pod install时,出现以下错误:-

[!] Invalid `Podfile` file: cannot load such file -- app/node_modules/react-native-unimodules/cocoapods.

 #  from app/ios/Podfile:3
 #  -------------------------------------------
 #  
 >  require_relative '../node_modules/react-native-unimodules/cocoapods'
 #  require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

1 个答案:

答案 0 :(得分:0)

您应在pod install所在的ios目录中运行Podifle

cd ios
pod install