当我尝试在 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/