ireading demo RN工程配置

代码地址

https://github.com/attentiveness/reading

配置步骤:

1.报错代码

Command /bin/sh failed with exit code 1

解决方案:

项目->Build Phases->Bundle React Native code and images -> 勾选 Run script only when installing

2.报错代码:

'boost/iterator/iterator_adaptor.hpp' file not found

解决方案:

2.1删除 你本地的nodemodules文件夹

2.2把你本地的page.json代码清空粘上如下代码

{
  "name": "reading",
  "version": "2.1.0",
  "description": "iReading App Write In React-Native",
  "license": "Apache-2.0",
  "repository": {
    "type": "git",
    "url": "[email protected]:attentiveness/reading.git"
  },
  "engines": {
    "node": ">=4"
  },
  "scripts": {
    "start": "node node_modules/react-native/local-cli/cli.js start",
    "test": "jest",
    "lint": "eslint app --fix",
    "format": "find app -name '*.js' | xargs prettier --write --single-quote"
  },
  "dependencies": {
    "leancloud-storage": "3.0.4",
    "lodash": "^4.17.4",
    "moment": "^2.18.1",
    "react": "16.0.0-alpha.6",
    "react-native": "0.44.3",
    "react-native-code-push": "^5.0.0-beta",
    "react-native-device-info": "^0.11.0",
    "react-native-exceptions-manager": "^0.2.0",
    "react-native-scrollable-tab-view": "0.7.4",
    "react-native-simple-store": "^1.3.0",
    "react-native-timeago": "^0.3.0",
    "react-native-vector-icons": "^4.3.0",
    "react-native-wechat": "^1.9.9",
    "react-navigation": "^1.0.0-beta.12",
    "react-redux": "^5.0.5",
    "redux": "^3.7.2",
    "redux-logger": "^3.0.6",
    "redux-saga": "^0.15.6"
  },
  "jest": {
    "preset": "react-native"
  },
  "devDependencies": {
    "babel-eslint": "^7.2.3",
    "babel-jest": "^20.0.3",
    "babel-preset-react-native": "2.0.0",
    "eslint": "^4.5.0",
    "eslint-config-airbnb": "^15.1.0",
    "eslint-plugin-import": "^2.3.0",
    "eslint-plugin-jsx-a11y": "^5.1.1",
    "eslint-plugin-react": "^7.3.0",
    "jest": "^20.0.4",
    "prettier": "^1.5.3",
    "react-test-renderer": "16.0.0-alpha.6",
    "redux-devtools": "^3.4.0"
  }
}

2.3cd到工程路径下,

npm install 
rnpm link

2.4 appdelegate.m中改变一行代码,如下 , 运行即可

屏幕快照 2017-08-31 下午12.12.44.png

你可能感兴趣的:(ireading demo RN工程配置)