ReactNativeNode

Print: Entry, “:CFBundleIdentifier”, Does Not Exist

在终端执行如下命令时:
react-native run-ios

run-ios 报如下错误:

1
2
3
4
5
6
7
Failed to install the requested application
An application bundle was not found at the provided path.
Provide a valid path to the desired application bundle.
Print: Entry, ":CFBundleIdentifier", Does Not Exist
Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/ReactNativexx.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist

在终端执行如下命令时:
react-native run-android

run-android 报如下错误:

1
unable to load script from assets 'index.android bundle' ,Make sure your bundle is packaged correctly or youu're runing a packager server

run-android报错描述

如上两个问题我的解决办法是一样的,只是安卓的时候把第4步的run-ios换成run-android就ok了

问题解决:
这是经过各种尝试后得出的结果了,查看的下面的链接,给出的前几个方法结过测试都不能解决我的问题,只有下面的的方法是可以的

解决步骤

  1. 首先删除node_modules
  2. 修改package.json中react-native的版本为0.44.3 react为16.0.0-alpha.6
  3. 执行npm install
  4. react-native run-ios 就可以了

问题参考链接:
http://www.jianshu.com/p/98c8f2a970eb

上面是一个治标不治本的方法【先记录一下】
我使用xcode打开,运行,报如下错误

boost/iterator/iterator_adaptor.hpp’ file not found

产生原因:

  • /Users/Vanessa/.rncache 中 boost_1_63_0.tar.gz, double-conversion-1.1.5.tar.gz, folly-2016.09.26.00.tar.gz, glog-0.3.4.tar.gz 文件下载不完整
  • node_modules/react-native/third-party 文件不完整

解决方案:

  1. 我是手动下载后放入 【 选中Finder–>command+g–>输入~/.rncache 】将下载好的文件放到~/.rncache 中 下载链接
  2. 把以上文件解压后放入 当前项目目录下的 node_modules/react-native/third-party
  3. Clean & Build 【 我是使用Xcode

问题参考连接:http://vanessa.b3log.org/articles/2017/06/12/1497235254333.html

Error watching file for changes: EMFILE

今天升级Mac系统到MacOS Sierra后(或者React Native升级导致?),发现运行react-native start会出现Error watching file for changes: EMFILE异常,异常详情如下如:

解决步骤

  1. 卸载所有已安装的watchman:brew uninstall –force watchman
  2. 删除watchman相关文件:rm -rf /usr/local/var/run/watchman/
  3. 重新安装watchman:brew install watchman

问题参考链接:http://blog.csdn.net/a1540077373/article/details/52955894