react-native: 'config.h' file not found - mutex.h

Environment

React Native Environment Info:
    System:
      OS: macOS High Sierra 10.13.6
      CPU: (4) x64 Intel(R) Core(TM) i7-2620M CPU @ 2.70GHz
      Memory: 7.40 GB / 16.00 GB
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 10.13.0 - /usr/local/bin/node
      Yarn: 1.12.3 - /usr/local/bin/yarn
      npm: 6.4.1 - /usr/local/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 12.0, macOS 10.14, tvOS 12.0, watchOS 5.0
    IDEs:
      Xcode: 10.0/10A255 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.6.1 => 16.6.1
      react-native: 0.57.5 => 0.57.5
    npmGlobalPackages:
      react-native-cli: 2.0.1

Description

As mentioned here, this must be fixed but i’m getting this error after using react-native init MyTestProject.

Reproducible Demo

Simply use react-native init MyTestProject and you will get this error! Also, i tried to set the Project Settings to Legacy Build System and cleaned the build folder but no result!

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 17 (2 by maintainers)

Most upvoted comments

In the Terminal, navigate to the react-native/third-party/glog folder inside node_modules (for me, this was cd node_modules/react-native/third-party/glog-0.3.4) Once actively in this folder, run …/…/scripts/ios-configure-glog.sh Glog is configured and the required config.h header file is created for Xcode to find

Am also facing same issue can someone help me to resolve this

As a temporary fix, you could navigate to ..\node_modules\react-native\third-party\glog-0.3.5 and:

./configure
make

@MohamadKh75 can you verify if 1/ this is still an issue on 0.58.0-rc.1, and 2/ if so, include a detailed list of steps to repro?

@facebook-github-bot duplicate #19529

If you use Yarn, running yarn --check-files usually fix that for me (also you may want to change Node to latest LTS)