【发布时间】:2022-07-06 08:42:51
【问题描述】:
在使用 npm 8.3.1 和 node 17.4 的 M1 Mac 上,当我运行 npx react-native run-ios 时收到 2 个错误:
The following build commands failed:
CompileC /Users/Steven/Library/Developer/Xcode/DerivedData/HelloSteve-hghgfcwemhoaiacfwlophutqqzbh/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RCT-Folly.build/Objects-normal/arm64/SysUio.o /Users/Steven/Documents/Projects/React\ Native/HelloSteve/ios/Pods/RCT-Folly/folly/portability/SysUio.cpp normal arm64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'RCT-Folly' from project 'Pods')
CompileC /Users/Steven/Library/Developer/Xcode/DerivedData/HelloSteve-hghgfcwemhoaiacfwlophutqqzbh/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RCT-Folly.build/Objects-normal/arm64/NetOps.o /Users/Steven/Documents/Projects/React\ Native/HelloSteve/ios/Pods/RCT-Folly/folly/net/NetOps.cpp normal arm64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'RCT-Folly' from project 'Pods')
(2 failures)
来自this answer,Podfile 中不存在flipper_post_install(installer) 行。
从this answer,我在Podfile 中注释掉# use_flipper!(),运行pod install 然后npx react-native run-ios 并收到类似的错误:
The following build commands failed:
CompileC /Users/Steven/Library/Developer/Xcode/DerivedData/HelloSteve-hghgfcwemhoaiacfwlophutqqzbh/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RCT-Folly.build/Objects-normal/arm64/SysUio.o /Users/Steven/Documents/Projects/React\ Native/HelloSteve/ios/Pods/RCT-Folly/folly/portability/SysUio.cpp normal arm64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'RCT-Folly' from project 'Pods')
(1 failure)
我尝试了solution here,(在Time.h 中注释掉typedef uint8_t clockid_t; 行)但也没有用。
帮助表示赞赏。
【问题讨论】:
-
你能告诉我,使用的是哪个版本的 react native?
-
@VickyAhuja,版本
0.67.2。
标签: ios xcode react-native macos