我在项目的根目录执行
yarn ios --simulator 'iPhone 14 Pro'命令时,报了如下的错误:
React Native CLI uses autolinking for native dependencies, but the following modules are linked manually:
- react-native-doc-viewer (to unlink run: "react-native unlink react-native-doc-viewer")
- react-native-document-picker (to unlink run: "react-native unlink react-native-document-picker")
- react-native-fs (to unlink run: "react-native unlink react-native-fs")
This is likely happening when upgrading React Native from below 0.60 to 0.60 or above. Going forward, you can unlink this dependency via "react-native unlink <dependency>" and it will be included in your app automatically. If a library isn't compatible with autolinking, disregard this message and notify the library maintainers.
但是当我按照提示去执行:
react-native unlink react-native-doc-viewer命令时,报了
error: unknown command 'unlink',请问有哪位大神,遇到了,亟待解决,求帮助?
如果提供的思路能够解决问题,会给予一个红包作为回报。
已经找到解决办法。
1、在项目的根目录下新建一个 react-native.config.js文件。
文件中如下配置: