美文网首页
react-native run-ios报错

react-native run-ios报错

作者: Sunnyyangzx | 来源:发表于2017-08-04 17:14 被阅读211次

    初探RN按照  RN中文网 文档配置完开发环境之后运行react-native run-ios报错 可能有":CFBundleIdentifier", Does Not Exist,也可能是Command `run-ios` unrecognized. Make sure that you have run `npm install` and that you are inside a react-native project 这个人感觉是版本问题,在网上查答案,找到一种可以解决的方法;

    首先删除 node-modules 文件夹;

    然后打开pakage.json 文件,

        "react": "16.0.0-alpha.12",

        "react-native": "0.47.1" 

      这两个文件(版本可能为其他),修改为:

        "react": "16.0.0-alpha.6",

        "react-native": "0.44.3"

    最后运行 nmp install 。

    运行react-native run-ios 即可启动程序,可以选择自己喜欢的开发工具去开发你的RN项目。

    相关文章

      网友评论

          本文标题:react-native run-ios报错

          本文链接:https://www.haomeiwen.com/subject/ooavlxtx.html