Home > database >  error: Unable to load contents of file list: '/Target Support Files. npx react-native run-ios
error: Unable to load contents of file list: '/Target Support Files. npx react-native run-ios

Time:11-04

I have upgraded mac to macOS Ventura V13

XCode Version 14.0.1

Until today everything worked perfectly on my mac for React Native, it had been days since I started anything new

Today I wanted to start a new project and I got some errors.

It's been several days looking for a solution to this problem and of course I'm not giving up, but I think trying things randomly will only mess up my configuration a lot more

Can you help me with this ?

Would it be wise to remove all my React Native Development setup and environment and start over?

I have started like this:

npx react-native init MyProject

And I have received this in the terminal:

   ✔ Downloading template
    ✔ Copying template
    ✔ Processing template
    ✖ Installing Bundler
    error Your Ruby version is 2.6.10, but your Gemfile specified 2.7.5
    
    ✖ Installing Bundler
    error Error: Looks like your iOS environment is not properly set. 
Please go to https://reactnative.dev/docs/next/environment-setup and follow the React Native CLI QuickStart guide for macOS and iOS.

When I have run "npx react-native run-ios" I receive the following error that prevents my Application from being compiled:

info Found Xcode project "MyAwesomeM1.xcodeproj"
info Building (using "xcodebuild -project MyAwesomeM1.xcodeproj -configuration Debug -scheme MyAwesomeM1 -destination id=")
error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening MyAwesomeM1.xcodeproj.
Command line invocation:
    /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -project MyAwesomeM1.xcodeproj -configuration Debug -scheme MyAwesomeM1 -destination id=39519BD6-BF77-4086-B896-646C9FAD2237

User defaults from command line:
    IDEPackageSupportUseBuiltinSCM = YES

Prepare packages

Computing target dependency graph and provisioning inputs

Create build description
Build description signature: 
Build description path: /Users/miguelito/Library/Developer/Xcode/DerivedData/MyAwesomeM1-cwtqpqolrtesoxdzxrobotfpeptc/Build/Intermediates.noindex/XCBuildData/xxxxx-desc.xcbuild

note: Building targets in dependency order
/Users/miguelito/MyAwesomeM1/ios/Pods/Target Support Files/Pods-MyAwesomeM1/Pods-MyAwesomeM1.debug.xcconfig:1:1: error: unable to open configuration settings file
/Users/miguelito/MyAwesomeM1/ios/Pods/Target Support Files/Pods-MyAwesomeM1/Pods-MyAwesomeM1.debug.xcconfig:1:1: error: unable to open configuration settings file
/Users/miguelito/MyAwesomeM1/ios/Pods/Target Support Files/Pods-MyAwesomeM1/Pods-MyAwesomeM1.debug.xcconfig:1:1: error: unable to open configuration settings file
/Users/miguelito/MyAwesomeM1/ios/Pods/Target Support Files/Pods-MyAwesomeM1/Pods-MyAwesomeM1.debug.xcconfig:1:1: error: unable to open configuration settings file
warning: Unable to read contents of XCFileList '/Target Support Files/Pods-MyAwesomeM1/Pods-MyAwesomeM1-resources-Debug-output-files.xcfilelist' (in target 'MyAwesomeM1' from project 'MyAwesomeM1')
warning: Unable to read contents of XCFileList '/Target Support Files/Pods-MyAwesomeM1/Pods-MyAwesomeM1-frameworks-Debug-output-files.xcfilelist' (in target 'MyAwesomeM1' from project 'MyAwesomeM1')
error: Unable to load contents of file list: '/Target Support Files/Pods-MyAwesomeM1/Pods-MyAwesomeM1-resources-Debug-input-files.xcfilelist' (in target 'MyAwesomeM1' from project 'MyAwesomeM1')
error: Unable to load contents of file list: '/Target Support Files/Pods-MyAwesomeM1/Pods-MyAwesomeM1-resources-Debug-output-files.xcfilelist' (in target 'MyAwesomeM1' from project 'MyAwesomeM1')
error: Unable to load contents of file list: '/Target Support Files/Pods-MyAwesomeM1/Pods-MyAwesomeM1-frameworks-Debug-input-files.xcfilelist' (in target 'MyAwesomeM1' from project 'MyAwesomeM1')
warning: Run script build phase '[CP] Copy Pods Resources' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'MyAwesomeM1' from project 'MyAwesomeM1')
error: Unable to load contents of file list: '/Target Support Files/Pods-MyAwesomeM1/Pods-MyAwesomeM1-frameworks-Debug-output-files.xcfilelist' (in target 'MyAwesomeM1' from project 'MyAwesomeM1')
warning: Run script build phase 'Bundle React Native code and images' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'MyAwesomeM1' from project 'MyAwesomeM1')
warning: Run script build phase 'Start Packager' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'MyAwesomeM1' from project 'MyAwesomeM1')
warning: Run script build phase '[CP] Embed Pods Frameworks' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'MyAwesomeM1' from project 'MyAwesomeM1')
** BUILD FAILED **
info Run CLI with --verbose flag for more details.

I have tried to run the application in XCode, but I also get errors:

.../ios/Pods/Headers/Private/RCT-Folly/folly/portability/Time.h:52:17: Typedef redefinition with different types ('uint8_t' (aka 'unsigned char') vs 'enum clockid_t')

  • Unable to load contents of file list: '/Target Support Files/Pods-MiguelFhasion/Pods-MiguelFhasion-frameworks-Debug-input-files.xcfilelist'

  • Unable to load contents of file list: '/Target Support Files/Pods-MiguelFhasion/Pods-MiguelFhasion-frameworks-Debug-output-files.xcfilelist'

Run script build phase 'Bundle React Native code and images' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase.

When I try to run the project for Android ( npx react-native run-android), it doesn't work either, I get a lot of errors, but when I run the project in Android Studio, everything works

I must say that I have put into practice some of the solutions proposed in questions similar to mine, but I can't find a solution.

I've googled, Forums, Stack for solutions and found stuff, made changes to my React Native install, install Node again, Brew again, made a lot of changes and now nothing works.

CodePudding user response:

Did you upgrade your ruby ? it clearly states that your ruby version is wrong

error Your Ruby version is 2.6.10, but your Gemfile specified 2.7.5

I guess the Bundler is not installed when you initialized the project.

PS: This can be due to an update in any of the packages including RN in your new project

CodePudding user response:

I faced the same issue after upgrading to macOS Ventura 13 on M1. It seems that the upgrade broke my Ruby environment. So I had to recreate it. Maybe all those steps are not necessary but I give you what worked for me.

Make sure you remove cocoapods

sudo gem uninstall cocoapods
gem uninstall cocoapods
brew uninstall cocoapods
// should return no path
which pod

Now the only thing that worked for me is to install cocoapods with brew

brew install cocoapods

I use rvm to manage Ruby versions.

Nuke everything

rvm implode

Reinstall ruby

rvm get stable
rvm use "ruby-2.7.5"

Make sure you have cocoapods in your gemfile

gem "cocoapods", "1.11.3"

Reinstall pods

cd ios
pod cache clean --all 
pod deintegrate 
pod setup --verbose
bundle install 
bundle exec pod install
cd ..

You should then be able to run npx react-native run-ios

  • Related