react-native-device-info: clang: error: no such file or directory: libRNDeviceInfo.a

Version v0.21.1
Affected OS iOS
OS Version RN 0.55

Current behavior

When i try to build or archive my project in xCode, i get the following:

clang: error: no such file or directory: '/Users/creative/Library/Developer/Xcode/DerivedData/PROJECT_NAME-bafoidfjyrtxuchdgsrpxhifyibq/Build/Intermediates.noindex/ArchiveIntermediates/PROJECT_NAME/BuildProductsPath/Release-iphoneos/libRNDeviceInfo.a'

However, the project is compiling successfully using react-native run-ios

Expected behavior

SHOULD BUILD SUCCESSFULLY

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 8
  • Comments: 22

Most upvoted comments

Removing the reference to RNDeviceInfo.xcodeproj and re-adding it in Xcode helped me.

I have had the same issue and after reading though a lot of issues I found as I am using pods and the workspace there is a issue when you use react native link

This basically adds two projects to your project one is the node_modules and one is coming from the pod file.

To fix I removed the links from the node_modules and these where the ones that was linked into the libraries on xCode. Shut everything down ran a clean and relink the pod files with xCode and it worked 🙌

If anyone is still having the issue I can try and help you out!