config.h file not found - react-native

I am working on thr react-native platform. I am using iOS. After creating project, the following error found:
config.h file not found mutex.h
Please help me resolve this issue.

The solution works for me is:
Quit your Xcode
Navigate to
cd node_modules/react-native/third-party/glog-0.3.4/
Then execute command:
./configure && make && make install
Now open project in Xocde, Build and Run.

Run the following commands in the project directory. Helped me resolve my config.h not found issue
cd node_modules/react-native/third-party/glog-0.3.4/
./configure
make
make install
cd ../../../..
react-native run-ios

Related

Using React-native-permissions I get this error when trying to build with xcode ld: library not found for -lPermission-LocationWhenInUse

I have tried manual linking as described here but I still get the error library not found for -lPermission-LocationWhenInUse
Do the below steps
go to ios folder from terminal,
run 'pod install' or 'pod update'.
Open ios/newproject.xcworkspace.
Also do not forget to enter the permission strings for location inside your info.plist file
First run react-natve link , then cd ios and then run this command pod install
cd .. and react-native run-ios
Don't forget to install pods

React Native Xcode build error on react-native-linear-gradient (-lBVLinearGradient)

I have followed all installation process according to the github page for react-native-linear-gradient.
But when I try to compile for ios (both through react-native run-ios command and Xcode), I get the following error:
ld: library not found for -lBVLinearGradient
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I've already opened the project through xcworkspace in which most suggests so when using Cocoapods, but the error persists anyhow.
Any clue on this?
I was having the same problem after upgrading 0.62.1 and the following did the trick for me:
Switched my project to new build system (was using legacy)
Manually deleted the .xcworkspace in ios folder
Removed app from simulator (also deleted all derived data) see how
rm -rf node_modules && sudo yarn install
cd ios && pod deintegrate
pod install
Run project in xcode
This worked for me, hope it can help someone

React-native -run-ios error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65

good time.
run ios error Failed
run code
react-native run-ios
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 reactapp.xcodeproj
** BUILD FAILED **
I've got the same error when run
$ react-native run-ios
My workaround steps:
open project by Xcode and choose the signature information as the attached image.
clear build folder: 'Your Project'/ios/build
re-run:
$ react-native run-ios
Hope this help.
That's because there is a new version of Flipper and React Native might not come with the right one so best is to go in your podfile and add this use_flipper!({ 'Flipper' => '0.74.0' }) then run pod install
If you don't have cocoa pods installed you need to by command sudo gem install cocoapods and run following commands from your project main directory
cd ios
pod install
cd ..
delete build folder from ios
react-native run-ios
if error persists, 1. delete build folder again 2. open the /ios folder in x-code 3. navigate File -> Project Settings -> Build System -> change (Shared workspace settings and Per-User workspace settings): Build System -> Legacy Build System
cd ios
rm -rf build/
cd ..
react-native run-ios

"config.h" file not found react native iOS

I tried almost all the solutions given to resolve this issue but nothing is working for me.
This issue is occurring when I am opening .xcodeproj
Can anyone please provide a permanent solution for this?
1) Close your Xcode.
2) Open Terminal, go to your project's root folder and do:
cd node_modules/react-native/third-party/glog-0.3.4/
3) Run the configure script:
./configure
4) Open Xcode and try to run your app.
You need to change to the legacy build system in Xcode 10 and install third party scripts manually.
File > Project/Workspace settings
Build System: dropdown > change to Legacy Build system
Follow this to manually install third party scripts for RN:
Clean RN cache
$ rm -rf ~/.rncache
Re-install the deps
$ cd your_project_path
$ rm -rf node_modules/ && npm install
Then install the third-party
$ cd node_modules/react-native/scripts
$ ./ios-install-third-party.sh
Run the commands below if glog installation failed.
$ cd ../third-party/glog-0.3.x
$ ./configure
This issue is caused by Xcode's recent update. I fixed this issue by the following easy steps and I found this to be the best solution after searching for a while and tried many.
Go to Xcode > File > Project Settings
Build System > Select "Legacy Build System"
Go to terminal and run cd /to-your-project-folder
Run rm -rf node_modules && yarn (to remove node_modules and reinstall them)
Go back to Xcode > Product > Clean
Product > press option key and then click Clean Build Folder
And click the clean button
Now you can run the project from Xcode or on the terminal run yarn run ios or react-native run-ios
Credits to Spencer Carli's video on YouTube
I hope this helps :-)

Failed to run react-native link on my project

When I run react-native link on my RN project, I got below error:
$ react-native link
rnpm-install ERR! ERRPACKAGEJSON No package found. Are you sure it's a React Native project?
Cannot read property '_text' of undefined
I have searched that some people say run react-native upgrade will resolve this issue. I have tried but no lock. My react version is shown as below:
$ react-native --version
react-native-cli: 2.0.1
react-native: 0.39.2
How can I solve this issue?
Follow below steps in order -
npm cache clean or yarn cache clean
rm -rf node_modules
yarn install or npm install
react-native upgrade ( You can choose no in all steps)
react-native link
If you get permission related error use sudo with all commands.
A little late but this may help someone else. My problem was large commented out copies of <manifest> ... </manifest> in android/app/src/main/AndroidManifest.xml. Once I removed commented out copies, link worked as expected.
It seems xmldoc had touble parsing the manifest even though the AndroidManifest.xml was valid XML. Calling react-native link uses ../node_modules/react-native/local-cli/core/android/index.js. To debug such issues in future I would start with putting debugging statements in ../node_modules/react-native/local-cli/core/android/index.js and narrow down to the root cause of the issue. Similar logic should work for ios.
For me cleaning the gradle did the trick.
1- Go to the root directory of the project.
2- Run cd android
3- Run gradlew clean
4- Run cd..
and then run the link commands
i had this problem. i fixed it with following way:
1- edit "/android/app/src/debug/AndroidManifest.xml"
2- add package="com.YOUR PACKAGE NAME" inline manifest tag. like:
<manifest package="com.YOUR PACKAGE NAME"
note: replace "YOUR PACKAGE NAME" with your package. you can find it in "/android/app/src/main/AndroidManifest.xml"
3- cd android
4- ./gradlew clean
5- cd ../
6- react-native link
try to go android -> src -> main -> AndroidManifest.xml and delete all comments here. After that rerun react-native link, and all is working for me. Good luck!