Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React native Pod install getting Permission denied

I'm created new project using command react-native init testprog
then change dir to testprog and pod install but it give permission denied error

$ pod install
Analyzing dependencies
Fetching podspec for `DoubleConversion` from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`
Fetching podspec for `RCT-Folly` from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`
Fetching podspec for `glog` from `../node_modules/react-native/third-party-podspecs/glog.podspec`
Downloading dependencies
Installing CocoaAsyncSocket (7.6.5)
Installing DoubleConversion (1.1.6)
Installing FBLazyVector (0.64.0)
Installing FBReactNativeSpec (0.64.0)
[!] /bin/bash -c 
set -e
mkdir -p /Volumes/MACMINI DATA SSD/testprog/node_modules/react-native/scripts/../React/FBReactNativeSpec/FBReactNativeSpec && touch /Volumes/MACMINI DATA SSD/testprog/node_modules/react-native/scripts/../React/FBReactNativeSpec/FBReactNativeSpec/FBReactNativeSpec.h /Volumes/MACMINI DATA SSD/testprog/node_modules/react-native/scripts/../React/FBReactNativeSpec/FBReactNativeSpec/FBReactNativeSpec-generated.mm

mkdir: /Volumes/MACMINI: Permission denied

I was try following things but it not working

  • update pod
  • reinstall pod
  • chown command for ~/.cocoapods
  • chown command for ~/Library/Caches/CocoaPods
  • chown command for /usr/local/bin/npm
  • chown command for /usr/local/bin/npx
  • chown command for /usr/local/bin/node

What is wrong?
How to resolve it?

Pod version: 1.10.1
Os Version: 10.15.7
react-native Version: 0.64.0

like image 498
Bhaumik Surani Avatar asked May 09 '26 18:05

Bhaumik Surani


1 Answers

There can be multiple reason for this.

  • There is one solution which always worked for me is

sudo pod install --allow-root

  • Go to your ios folder -> Go to get info -> read & write (to your user) -> click on small setting button below there -> Apply to enclosed items.
like image 137
Iva Avatar answered May 12 '26 09:05

Iva