Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React Native pod install #12206

Open
mohamadjalazzeh opened this issue Jan 9, 2024 · 2 comments
Open

React Native pod install #12206

mohamadjalazzeh opened this issue Jan 9, 2024 · 2 comments

Comments

@mohamadjalazzeh
Copy link

mohamadjalazzeh commented Jan 9, 2024

Error

Errno::EACCES - Permission denied @ rb_sysopen - /Users/jkoma/Library/Caches/CocoaPods/Pods/VERSION
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.14.3/lib/cocoapods/downloader/cache.rb:171:in `initialize'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.14.3/lib/cocoapods/downloader/cache.rb:171:in `open'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.14.3/lib/cocoapods/downloader/cache.rb:171:in `open'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.14.3/lib/cocoapods/downloader/cache.rb:171:in `ensure_matching_version'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.14.3/lib/cocoapods/downloader/cache.rb:22:in `initialize'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.14.3/lib/cocoapods/downloader.rb:41:in `new'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.14.3/lib/cocoapods/downloader.rb:41:in `download'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.14.3/lib/cocoapods/installer/pod_source_downloader.rb:69:in `download!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.14.3/lib/cocoapods/installer/pod_source_installer.rb:117:in `download_source'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.14.3/lib/cocoapods/installer/pod_source_installer.rb:67:in `install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.14.3/lib/cocoapods/installer.rb:621:in `install_source_of_pod'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.14.3/lib/cocoapods/installer.rb:539:in `block (2 levels) in install_pod_sources'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.14.3/lib/cocoapods/user_interface.rb:86:in `titled_section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.14.3/lib/cocoapods/installer.rb:538:in `block in install_pod_sources'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.14.3/lib/cocoapods/installer.rb:535:in `each'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.14.3/lib/cocoapods/installer.rb:535:in `install_pod_sources'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.14.3/lib/cocoapods/installer.rb:258:in `block in download_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.14.3/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.14.3/lib/cocoapods/installer.rb:257:in `download_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.14.3/lib/cocoapods/installer.rb:163:in `install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.14.3/lib/cocoapods/command/install.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/claide-1.1.0/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.14.3/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.14.3/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
@maxim-narchuk-cleverside

I have exactly the same problem after updating cocoapods

@mohamadjalazzeh
Copy link
Author

@maxim-narchuk-cleverside I was able to fix it by

Remove Existing CocoaPods Cache

sudo rm -rf ~/Library/Caches/CocoaPods

Create New CocoaPods Directory and Set Permissions (allow root)

sudo mkdir -p ~/Library/Caches/CocoaPods
sudo chmod -R 777 ~/Library/Caches/CocoaPods

Navigate to the CocoaPods Directory

cd ~/Library/Caches/CocoaPods

Create Pods Directory and Set Permissions (allow root)

sudo mkdir -p Pods
sudo chmod -R 777 Pods

Go Back to Your Project Directory

cd path/to/your/project

Check Current User

whoami

Note down the username

Set Correct Ownership for node_modules in Your Project (allow root)

sudo chown -R yourUsername: node_modules/

Replace yourUsername with the username obtained from the whoami command

Navigate to iOS Directory in Your Project

cd ios

Run pod install Command

pod install

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants