简体   繁体   English

当我使用“react-native run-ios”运行 React Native 项目时显示错误

[英]React Native project showing error when I run it using "react-native run-ios"

  1. Installed react-native安装 react-native

  2. Created a project with "react-native init myproj"使用“react-native init myproj”创建了一个项目

  3. After that I tried to run the project using "react-native run-ios"之后我尝试使用“react-native run-ios”运行项目

It fails here with the error below:它在这里失败并出现以下错误:

Print: Entry, ":CFBundleIdentifier", Does Not Exist /Users/blaze/Desktop/prasa/node_modules/promise/lib/done.js:10 throw err;打印:条目,“:CFBundleIdentifier”,不存在/Users/blaze/Desktop/prasa/node_modules/promise/lib/done.js:10 throw err; ^ ^

Error: Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/prasa.app/Info.plist Print: Entry, ":CFBundleIdentifier", Does Not Exist错误:命令失败:/usr/libexec/PlistBuddy -c 打印:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/prasa.app/Info.plist 打印:条目,“:CFBundleIdentifier”,不存在

Any suggestions?有什么建议么?

  1. Delete the iOS/build directory 删除iOS / build目录
  2. Reset content and settings in the iOS simulator 重置iOS模拟器中的内容和设置

It worked for me. 它对我有用。

I solved this issue with the react-native upgrade command, which helped me reset some details in various xcode files. 我使用react-native upgrade命令解决了这个问题,这有助于我重置各种xcode文件中的一些细节。 This solved the issue. 这解决了这个问题。

delete node modules folder.删除节点模块文件夹。 and reinstall it again using yarn/npm install然后使用 yarn/npm install 重新安装

This solved the issue这解决了这个问题

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM