8

I've created a project with react-native-cli and installed some pods via cocoapods but eveytime I try building the project in Xcode it gives me this strange error:

Non-portable path to file /UUsersCcrysilDDesktopaapp-demoiiosPPodsTTarget Support Filesyyogayyoga-prefix.pch; specified path differs in case from the file name on disk

For some reason the path duplicates the first character for each file/folder and removes all backslashes. I can find this file without problems in the finder and I haven't touched any of the path variables automatically set by cocoapods so I'm not sure what could be causing this. I've also tried deleting all the pods and reinstalling them, deleting the whole /ios folder and rebuilding it but nothing seems to work.

I'm using Xcode 9.2, react-native 0.53.3 and cocoapods 1.4.0 and here's my Podfile incase it might help: https://nofile.io/f/6oCNuZ6HEYb/Podfile

crysil
  • 81
  • 1
  • 2

5 Answers5

11

For me, I had to remove and reinstall both node_modules and Pods. Always reinstall node_modules first, as Pods rely on them.

rm -Rf node_nodules
npm install
cd ios
rm -Rf Pods
pod install
Jeremy
  • 3,049
  • 3
  • 28
  • 50
1

For me the only working solution was to remove the pods

rm -Rf Pods pod install rebuild

MokumJ
  • 111
  • 9
1

enter image description here

For me, changing 'yoga' to 'Yoga' in the path for Prefix Header got rid of the error

vrush
  • 74
  • 4
0

Remove the node_modules Add the dependencies back using yarn or npm install This should remove this error

Shahid Pasha
  • 81
  • 2
  • 5
0

Here is how I fix this problem:

davychhouk
  • 127
  • 4
  • 13