为什么尝试创建React Native应用程序时会出现此错误? [关闭]

问题描述 投票:0回答:2

所以我上周刚开始使用expo学习Android和iOS的App开发,当我第一次安装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.

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

javascript reactjs react-native expo init
2个回答
0
投票

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


-1
投票

您应该安装节点模块“ @ react-native-community / cli”进行修复。

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

© www.soinside.com 2019 - 2024. All rights reserved.