首页 > 解决方案 > 错误在“npm”注册表上找不到“@jest/reporters@^24.5.0”所需的包“@jest/environment@^24.5.0”

问题描述

我对 React Native 完全陌生,我正在使用 React Native CLI在https://facebook.github.io/react-native/docs/getting-started上关注 Facebook 的教程。

昨天,我成功创建了一个项目。今天,当我创建一个空文件夹并运行时,react-native init AnotherProject我得到:

error Couldn't find package "@jest/environment@^24.5.0" required by "@jest/reporters@^24.5.0" on the "npm" registry.

我究竟做错了什么?我在 npm 6.7.0 和节点 11.12.0 上。

标签: node.jsreact-nativenpm

解决方案


诡异的。我再次运行了完全相同的命令,并且成功了。


推荐阅读