新版React Native找不到boost/config/us

2017-09-25  本文已影响0人  HT_Jonson

之前一直使用很老版本的React Native项目,今天创建了一个新版本的项目,然后就没有然后了,运行不了,网上资料也少,后来在github的issue里面发现很多人都遇到了这个问题,查找半天发现可能是“网络”问题,就用了笨方法解决了,具体步骤如下:

下载下面的几个压缩文件:

https://github.com/google/double-conversion/archive/v1.1.5.tar.gz

https://github.com/react-native-community/boost-for-react-native/releases/download/v1.63.0-0/boost_1_63_0.tar.gz

复制到 ~/.rncache/ 下覆盖掉原来的

然后再解压到 node_modules/react-native/third-party/ 下,重新编译应该就没有问题了。

我的package.json文件

{
 "name": "Demo",
 "version": "0.0.1",
 "private": true,
 "scripts": {
 "start": "node node_modules/react-native/local-cli/cli.js start",
 "test": "jest"
 },
 "dependencies": {
 "react": "16.0.0-alpha.12",
 "react-native": "0.48.2"
 },
 "devDependencies": {
 "babel-jest": "21.0.2",
 "babel-preset-react-native": "3.0.2",
 "jest": "21.0.2",
 "react-test-renderer": "16.0.0-alpha.12"
 },
 "jest": {
 "preset": "react-native"
 }
}

上一篇下一篇

猜你喜欢

热点阅读