Reputation: 81
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
Upvotes: 8
Views: 5291
Reputation: 74
For me, changing 'yoga' to 'Yoga' in the path for Prefix Header got rid of the error
Upvotes: 1
Reputation: 3738
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
Upvotes: 15
Reputation: 201
For me the only working solution was to remove the pods
rm -Rf Pods
pod install
rebuild
Upvotes: 1
Reputation: 1613
Here is how I fix this problem:
install rvm (How to update Ruby Version 2.0.0 to the latest version in Mac OSX Yosemite?)
install the latest ruby via rvm. Run the following command to see the latest version of ruby: run rvm list known
At the time of this solution, the ruby was ruby-2.4.1 so I run: rvm install ruby-2.4.1
Go to Ling iOS folder. Run:
gem update --system
gem install cocoapods
pod install
Upvotes: 0
Reputation: 81
Remove the node_modules Add the dependencies back using yarn or npm install This should remove this error
Upvotes: 0