React Native 应用程序不会在更新后构建

React Native app won't build after update

我最近回到了一个最初使用 React Native 0.23 构建的旧 React Native 项目,我尝试将应用程序更新到最新版本的 React Native 0.43.3。我现在遇到 iOS 应用程序无法构建并出现错误

的问题
ld: library not found for -lRCTWebSocketDebugger
clang: error: linker command failed with exit code 1 (use -v to see invocation)

有什么解决办法吗?

IIRC 在某些时候(不记得是哪个版本),RCTWebSocketDebugger.xcodeproj 被重命名为 RCTWebSocket.xcodeproj 所以你需要通过 XCode 删除对旧库的依赖,然后运行 react-native link 依赖新库。