npm WARN jest-react-native@17.0.0需要一个whowg-fetch@^1.0.0的对等方但没有安装

时间:2016-11-18 07:29:52

标签: 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

1 个答案:

答案 0 :(得分:13)

您需要手动安装缺少的对等依赖项 max = list[0]; for (int i = 1; i < num; i++) { if (list[i] > max){ max = list[i]; } }