參考this問題,我有同樣的問題。我有VMware上的MacO El Captain。無法在Mac上構建並運行react-native項目問題,我有同樣的問題。
- 節點訴7.8.0
- NPM v.4.6.1
- 反應天然-CLI 2.0.1
- 反應天然0.46.4
- 的Xcode訴8.2.1
我有兩個問題: - 試圖init
新的反應本地項目時,在包裝上正從回購反應本地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我的應用程序周。 我已經嘗試了所有建議的解決方案,但沒有什麼作品。
任何人都可以幫助我嗎?
在Mac上使用react-native彈出重新生成ios和android文件夾可解決此問題。非常感謝你! – Androidian
@Androidian是的,ios和android文件夾的再生是有幫助的,因爲每幾個版本的react-native都有一些內部項目設置相關的變化。這就是爲什麼watch-del-all命令在這種情況下不起作用的原因。 – dann