RN cli 2.0.1版
代码:9.4.1(9F2000)
或
代码10
在将RN从0.56更新到0.57.0(或0.57.1)之后,我得到了很多
could not build module 'CoreFoundation'
或
could not build module Foundation
limits file not found
我完全按照RN doc中的步骤进行更新。
我试着搬走了
ios/build
正在生成BunteMobile/OneSignalNotificationServiceExtension[调试]
检查NotificationService.m的依赖关系
/Users/myuser/Desktop/projects/mobileapp/ios/./node\u modules/react native/ReactCommon/fabric/graphics/platform/ios/float.h:8:10:
找不到“limits”文件
#include <limits>
/Users/myuser/Desktop/projects/mobileapp/ios/./node\u modules/react native/ReactCommon/fabric/graphics/platform/ios/float.h:8:10:
#包括<限制>
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:10:
无法生成模块“CoreFoundation”
#include <CoreFoundation/CoreFoundation.h>
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/Security.framework/Headers/SecBase.h:28:10:
#include <CoreFoundation/CFBase.h>
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CFNetwork.framework/Headers/CFNetwork.h:18:10:
无法生成模块“CoreFoundation”
#包括<CoreFoundation/CoreFoundation.h>
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/NSString+UserNotifications.h:8:9:
无法生成模块“Foundation”
#import <Foundation/Foundation.h>
如果我删除OneSignalNotificationServiceExtension而不是7
错误我在项目的其他部分还有15个错误:
/Users/myuser/Desktop/projects/mobileapp/ios/./node\u modules/react native/ReactCommon/fabric/graphics/platform/ios/float.h:8:10:
找不到“limits”文件
#包括<限制>
/Users/myuser/Desktop/projects/mobileapp/ios/./node\u modules/react native/ReactCommon/fabric/graphics/platform/ios/float.h:8:10:
找不到“limits”文件
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:10:
无法生成模块“CoreFoundation”
#包括<CoreFoundation/CoreFoundation.h>
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/Security.framework/Headers/SecBase.h:28:10:
无法生成模块“CoreFoundation”
#包括<核心基金会/CFBase.h>
无法生成模块“CoreFoundation”
/Users/myuser/Desktop/projects/mobileapp/ios/build/build/Products/Debug iphonesimulator/include/React/RCTBridgeModule.h:8:9:
无法生成模块“Foundation”
#导入<基金会/基金会。h>
唯一的解决办法,我发现是降低雷诺数回到0.56。。。
根据注册护士小组的回答
https://github.com/facebook/react-native/issues/21482
将所有babel deps改为7应该可以解决这个问题,但即使在
npx babel-ugrade -w
和重新安装的节点模块+缓存清理我得到同样的错误。
但还是有同样的问题。
我花了三天时间来解决这个IOS构建问题。。。。
注意:在升级了RN和babel之后,我就可以构建android了。
React本机git关联票证:
https://github.com/facebook/react-native/issues/21482