gpt4 book ai didi

ios - 无法在 Mac 上构建和运行 react-native 项目

转载 作者:行者123 更新时间:2023-11-28 19:30:14 25 4
gpt4 key购买 nike

引用 this问题,我有同样的问题。我在 VMware 上安装了 MacOs El Captain。

  • Node v.7.8.0
  • npm v.4.6.1
  • react-native-cli 2.0.1
  • native react 0.46.4
  • Xcode 8.2.1 版本

我有两个问题:- 当尝试 init 一个新的 react-native 项目时,包获取在从 repo 获取 react-native 0.46.4 包时挂起。其他包下载成功。因此,我从 Windows 执行了 npm install,然后在 Mac 上复制了 node_modules 文件夹。- 当尝试在 iOS 模拟器上运行该项目时,我收到以下错误:

** 构建失败 **

...
In file included from /Users/michelebombardi/Desktop/ReactNativeProjects/caliup/node_modules/react-native/React/../third-party/folly-2016.09.26.00/folly/Bits.h:70:
/Users/michelebombardi/Desktop/ReactNativeProjects/caliup/node_modules/react-native/React/../third-party/folly-2016.09.26.00/folly/detail/BitIteratorDetail.h:21:10: fatal error: 'boost/iterator/iterator_adaptor.hpp' file not found
#include <boost/iterator/iterator_adaptor.hpp>

The following build commands failed:

CompileC /Users/michelebombardi/Desktop/ReactNativeProjects/caliup/ios/build/Build/Intermediates/React.build/Debug-iphonesimulator/third-party.build/Objects-normal/x86_64/Conv.o /Users/michelebombardi/Desktop/ReactNativeProjects/caliup/node_modules/react-native/third-party/folly-2016.09.26.00/folly/Conv.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)

Installing build/Build/Products/Debug-iphonesimulator/CaliUp.app
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
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/CaliUp.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist`

我真的需要在本周末之前在 App Store 上发布我的应用程序。我已经尝试了所有建议的解决方案,但没有任何效果。

谁能帮帮我?

最佳答案

首先试试这个:守望者 watch-del-all && rm -rf node_modules

如果您使用 Homebrew 安装 Node ,请卸载它并从此处安装 Node 。( https://nodejs.org/en/ )

现在如果你使用 yarn 安装 Node 模块:试试 npm 安装

关于ios - 无法在 Mac 上构建和运行 react-native 项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45922921/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com