react-native - 为什么react native在取消链接后仍然认为我的库是链接的?(0.60.x)
问题描述
升级到 RN 0.60.x 时,我一直看到此错误消息:
error React Native CLI uses autolinking for native dependencies, but the following modules are linked manually:
- react-native-localize (to unlink run: "react-native unlink react-native-localize")
- react-native-orientation-locker (to unlink run: "react-native unlink react-native-orientation-locker")
- react-native-svg (to unlink run: "react-native unlink react-native-svg")
这仍然存在,包括在按照指示取消链接库、搜索所有项目文件以供参考以及使用yarn remove
/之后yarn add
。
如何成功取消链接并摆脱此错误消息?
解决方案
就我而言,Podfile 中有一些注释掉的 Pod 引用。
似乎 React Native 无法判断这些行已被注释掉:
# pod 'RNSVG', :path => '../node_modules/react-native-svg'
# pod 'react-native-orientation-locker', :path => '../node_modules/react-native-orientation-locker'
# pod 'RNLocalize', :path => '../node_modules/react-native-localize'
修复只是完全删除这些行;那摆脱了错误。
推荐阅读
- typescript - Typescript switch case混淆编译器
- javascript - 如何让这个幻灯片自动播放
- python - 使用python搜索字符串的第一次出现并在上面的行中插入字符串
- java - 如何将字符串添加到火花数据集中的字符串数组列
- angular - 将查询参数添加到 http 请求时出错
- kubernetes - 如何使用 GKE 启用子域
- flutter - 在flutter中加载多个JSON文件
- php - WordPress - 无法在条件语句中创建分类
- delphi - 为什么,如果通过变量向数据库添加值,则添加“ADOQuery1”,如果直接添加,则添加正确的值?
- sql - 如何检查 SQL Server 中数据字符串之间的分隔符(数据分隔符)