RN项目报错“RCTBundleURLProvider.h” file not found

来源:互联网 发布:华盛顿和李大学知乎 编辑:程序博客网 时间:2024/06/05 04:51

“RCTBundleURLProvider.h” file not found

从网上下载别人的ReactNative项目,打开iOS项目的时候,xcode会报错,提示:“RCTBundleURLProvider.h” file not found

解决方法:

  1. 打开Mac里面的终端,进入项目所在的文件夹目录;

  2. 把项目里面的 node_modules 文件夹删除掉,然后执行 npm install 命令

  3. npm install安装完成后, 执行react-native upgrade命令

最后重新打开Xcode,clean一下,应该就没有问题了,我的就是这么解决的。

4 0
原创粉丝点击