【问题标题】:Why do I get this error when trying to create a React Native app? [closed]为什么我在尝试创建 React Native 应用程序时会收到此错误? [关闭]
【发布时间】:2020-05-28 16:15:57
【问题描述】:

所以我上周刚开始使用 expo 来学习 Android 和 iOS 应用程序开发,当我第一次安装 Expo 并运行“expo init test”时,我没有遇到任何问题,并轻松创建了我能够创建的测试应用程序一些视图和按钮,并制作一个简单的应用程序。现在今天在尝试创建另一个应用程序时,我运行了expo init project1,然后当它运行时,我收到以下错误:

npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/errorhandler
npm ERR! 404
npm ERR! 404  'errorhandler@^1.5.0' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404 It was specified as a dependency of '@react-native-community/cli'
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\alexm\AppData\Roaming\npm-cache\_logs\2020-02-12T15_40_49_482Z-debug.log
npm exited with non-zero code: 1
Set EXPO_DEBUG=true in your env to view the stack trace.

我的开发设置、expo 或其他任何东西都没有改变,但现在我收到了这个错误。为什么会发生这种情况,我该如何解决?提前感谢您的帮助!

【问题讨论】:

  • npm 注册表中发生了一些错误。现在一切正常,请重试

标签: javascript reactjs react-native expo init


【解决方案1】:

你应该安装节点模块“@react-native-community/cli”来修复它。

npm i -g @react-native-community/cli

【讨论】:

    【解决方案2】:

    我遇到了同样的错误check this link。 npm 注册表中发生了一些错误,我认为这个问题现在已经解决了。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-09-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-08-01
      • 1970-01-01
      相关资源
      最近更新 更多