简体   繁体   中英

React-native Error while trying to build app using Xcode

I'm building a new project using Xcode and I get an error

react-native init test

{
  "name": "test1",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "node node_modules/react-native/local-cli/cli.js start",
    "test": "jest"
  },
  "dependencies": {
    "react": "16.8.3",
    "react-native": "0.59.9"
  },
  "devDependencies": {
    "@babel/core": "7.4.5",
    "@babel/runtime": "7.4.5",
    "babel-jest": "24.8.0",
    "jest": "24.8.0",
    "metro-react-native-babel-preset": "0.54.1",
    "react-test-renderer": "16.8.3"
  },
  "jest": {
    "preset": "react-native"
  }
}

I got this error

'glog/logging.h' file not found

尝试这个:

rm -rf ./node_modules && yarn && react-native run-ios

cd node_modules/react-native/third-party/glog-0.3.4 && ../../scripts/ios-configure-glog.sh should do the trick.

You just have to execute the script manually. Might need to sudo.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM