When running pod install, the terminal appear the following error log:
### Error
```
Errno::ENOENT - No such file or directory @ rb_sysopen - /project/sampleApp/ios/Pods/Local Podspecs/appcenter.podspec.json
/Library/Ruby/Gems/2.3.0/gems/cocoapods-core-1.8.0/lib/cocoapods-core/specification.rb:646:in `read'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-core-1.8.0/lib/cocoapods-core/specification.rb:646:in `checksum'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-core-1.8.0/lib/cocoapods-core/lockfile.rb:533:in `block in generate_checksums'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-core-1.8.0/lib/cocoapods-core/lockfile.rb:532:in `each'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-core-1.8.0/lib/cocoapods-core/lockfile.rb:532:in `generate_checksums'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-core-1.8.0/lib/cocoapods-core/lockfile.rb:428:in `generate'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.0/lib/cocoapods/installer.rb:744:in `generate_lockfile'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.0/lib/cocoapods/installer.rb:752:in `write_lockfiles'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.0/lib/cocoapods/installer.rb:299:in `generate_pods_project'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.0/lib/cocoapods/installer.rb:173:in `integrate'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.0/lib/cocoapods/installer.rb:162:in `install!'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.0/lib/cocoapods/command/install.rb:52:in `run'
/Library/Ruby/Gems/2.3.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.0/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.0/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:22:in `load'
/usr/local/bin/pod:22:in `<main>'
```
The installation in pod install should be aborted, which makes me cannot run react-native run-ios as some packages are not installed yet.
i'm getting the same error on appcenter, just started a few days ago
I also get the same error..
I fixed this error by running pod cache clean --all. Maybe that will help some of ya'll.
@HilSny 's suggestion didn't work for me. I ran into this error while upgrading from react native v. 0.59.10 to v 0.61.1. The error I was running into before this was that npm installing the appcenter modules didn't generate links in the podfile. I'll update if I find a solution.
I have the same error running AppCenter iOS build. Also recently upgraded to RN 0.61.1
Errno::ENOENT - No such file or directory @ rb_sysopen - /Users/vsts/agent/2.158.0/work/1/s/ios/Pods/Local Podspecs/appcenter.podspec.json
Edit - we are using v2.3.0 of AppCenter SDK, will try updating to 2.4.0
Earlier, I fixed the issue by adding this script to appcenter-post-clone.sh (placed in the project root and clicked 'Save & Build' in App Center to pick up the new script), but now this isn't working either. Also tried v1.8.3 for cocoapods version.
echo 'Doing some post-clone stuff...'
COCOAPODS_VER=1.7.1
echo "Installing CocoaPods version $COCOAPODS_VER"
sudo gem install cocoapods -v $COCOAPODS_VER
echo "Finished installing CocoaPods version $COCOAPODS_VER"
I have the same error running AppCenter iOS build. Also recently upgraded to RN 0.61.1
Errno::ENOENT - No such file or directory @ rb_sysopen - /Users/vsts/agent/2.158.0/work/1/s/ios/Pods/Local Podspecs/appcenter.podspec.jsonEdit - we are using v2.3.0 of AppCenter SDK, will try updating to 2.4.0
I got it working by doing these steps
yarn remove appcentercd iosrm -rf Pods Podfile.lockpod cache clean --allpod install --repo-updateThis time it should complete successfully. Then back in project folder do
yarn add appcentercd iospod installHere are the things I did to finally get the App Center build to work for our RN60 app:
1) Downgraded to cocoapods 1.7.1 locally (may not have been necessary)
2) Testing locally:
a. deleted Podfile.lock
b. $ cd ios && rm -rf Pods && pod cache clean --all && pod install && cd ..
This set 1.7.1 as the version at the bottom of the new Podfile.lock
3) In my appcenter-pre-build.sh script, removed "pod repo update"
I "think" "pod repo update" was the main issue that was messing me up.
Below are my post-clone and pre-build scripts if they help anyone. The pre-build script helps us to overwrite some code to help us always point to QA endpoints for our API. Locally, we check for __DEV__, but we wanted to make absolutely sure that when we do an app store release to Apple and Google, we would never again have to worry about not pointing to production API endpoints.
---- start appcenter-post-clone.sh -----
echo 'POST-CLONE: Doing some post-clone stuff...'
COCOAPODS_VER=1.7.1
echo "POST-CLONE: Installing CocoaPods version $COCOAPODS_VER"
sudo gem install cocoapods -v $COCOAPODS_VER
echo "POST-CLONE: Finished installing CocoaPods version $COCOAPODS_VER"
pod cache clean --all
echo "POST-CLONE: finished pod cache clean --all"
---- end appcenter-post-clone.sh -----
---- start appcenter-pre-build.sh -----
echo 'PRE-BUILD: Installing Pods'
cd ./ios && rm -rf Pods && pod cache clean --all && pod install
echo 'PRE-BUILD: Pods are installed properly !'
echo "PRE-BUILD: Replacing the APPCENTER_CUSTOM_APP_ENV string value in /App/Helpers/Config.js..."
CONFIG_FILE=$APPCENTER_SOURCE_DIRECTORY/App/Helpers/Config.js
echo "Updating $CONFIG_FILE"
sed -i '' -e 's/APPCENTER_CUSTOM_APP_ENV/is-appcenter/g' $CONFIG_FILE
echo "Updated contents:"
cat $CONFIG_FILE
---- end appcenter-pre-build.sh -----
It seems that Azure Devops has updated CocoaPods from 1.7.5 to 1.8.1.
I fixed it by using by installing and using the previous version. To do so I substitued the usage of the CocoaPods task by those scripts:
- script: |
gem install cocoapods -v $(pod.version)
displayName: 'Installing pod $(pod.version)'
- script: |
cd ios
pod _$(pod.version)_ --version
pod _$(pod.version)_ install
displayName: 'pod install'
with the variable pod.version set to 1.7.5.
@gdelafosse is right, the error clearly seems to be related to the Cocoapods version.
While if fails with 1.8.x, everything is ok with 1.7.x.
I just put these two commands in the appcenter-post-clone.sh file :
# Remove installed cocoapods version and force v1.7.5 :
sudo gem uninstall cocoapods -a -x
sudo gem install cocoapods -v 1.7.5
The appcenter documentation has examples for pegging the version of Cocoapods to the one in your lock file.
Hi @swingywc,
Thank you for reporting!
As I can see, you are using react-native v0.60.5 and react-native-code-push v5.7.0 but these are incompatible versions, you can take a look at supporting CodePush versions here: https://github.com/microsoft/react-native-code-push#supported-react-native-platforms
Not so long ago we released a new version of Code Push which supports react-native v0.60-v0.61.
All steps for installing the latest version of the plugin are described in our documentation: https://github.com/microsoft/react-native-code-push/blob/master/docs/setup-ios.md
I'm going to close this issue for now. Please feel free to reopen it if you have any questions or issues.
Most helpful comment
I got it working by doing these steps
yarn remove appcentercd iosrm -rf Pods Podfile.lockpod cache clean --allpod install --repo-updateThis time it should complete successfully. Then back in project folder do
yarn add appcentercd iospod install