android - npm WARN jest-react-native@17.0.0 需要 whatwg-fetch@^1.0.0 的对等体,但没有安装

标签 android reactjs npm react-native

当我尝试在 ReactNative 项目中运行 npm install 时,我得到了这个错误。为了解决这个问题,我也尝试安装 whatwg-fetch@^1.0.0 但同样的错误。

UNMET PEER DEPENDENCY whatwg-fetch@2.0.1

npm WARN jest-react-native@17.0.0 requires a peer of whatwg-fetch@^1.0.0 but none was installed.
npm ERR! code 1

最佳答案

您需要手动安装缺少的对等依赖项
npm install whatwg-fetch@^1.0.0 --save

关于android - npm WARN jest-react-native@17.0.0 需要 whatwg-fetch@^1.0.0 的对等体,但没有安装,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40671605/

相关文章:

android - 使用 gradle 签署产品 flavor

java - 如何自动(输入时)扩展和收缩 EditTexts 的列以显示所有符号?

javascript - 如何在React Js中单独更新一个子组件

ubuntu - 重新安装后 npm 找不到模块 'semver'

android - YouTube Android API 停止工作

android - 从 prefences.xml 中放入一些关键文本

node.js - 无法使用 npm 安装 Bower

javascript - 您可以使用 gulp 根据文件的父文件夹将文件连接在一起吗?

javascript - 如何在 this.props.children 更改时重新渲染组件

json - GraphQL/React 抛出网络错误 JSON.parse : unexpected character at line 1 column 1 of the JSON data