【问题标题】:React-native-fs peer dependency with RN?React-native-fs 对 RN 的对等依赖?
【发布时间】:2021-02-04 20:50:37
【问题描述】:
npm WARN react-native-fs@2.16.6 requires a peer of react-native@^0.59.5 but none is installed. You must install peer dependencies yourself.
npm WARN react-native-fs@2.16.6 requires a peer of react-native-windows@^0.57.2 but none is installed. You must install peer dependencies yourself.

当我运行 npm install 时会出现这两个警告。我知道我可以通过运行 npm install react-native-windows 来解决第二个问题,但我不确定如何解决第一个问题。

我目前正在运行 react-native 0.63.3。如果我尝试降级到 0.59.5,我会遇到许多其他问题。

在 react-native-fs npmjs 说明中,它列出了这个版本的 reat-native-fs 应该用于 RN > 0.61,这只会让我更加困惑为什么这不起作用。

我可以提供任何其他可能重要的文件。感谢您的帮助!

【问题讨论】:

    标签: react-native npm dependencies


    【解决方案1】:

    我做了“npm install --save react-native-fs --legacy-peer-deps”和“react-native link react-native-fs”

    这个模块对我来说很好用。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-10-18
      • 2021-12-05
      • 2017-09-25
      • 2018-04-04
      • 2016-06-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多