【问题标题】:Unexpected error using create-react-native-app:使用 create-react-native-app 的意外错误:
【发布时间】:2017-09-25 11:03:10
【问题描述】:

尝试使用 create-react-native-app 并在这里遇到第一个障碍。

我认为问题出在 Yarn 尝试安装依赖项时:

yarn install v0.27.5
[1/4] Resolving packages...
warning react-native > connect@2.30.2: connect 2.x series is deprecated
error An unexpected error occurred: "https://raw.githubusercontent.com/expo/node-websql/e364fa65146a9e2157a19e5c719e7702c2b6b87a/package.json: connect ETIMEDOUT 90.207.238.183:443".
info If you think this is a bug, please open a bug report with the information provided in "D:\\users\\jamie\\WebstormProjects\\hang\\hang-app\\yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

安装失败

奇怪的是我上周在这台机器上运行了 create-react-native-app 来测试它,一切都很好。

有人知道这里会发生什么吗?

【问题讨论】:

    标签: reactjs react-native yarnpkg


    【解决方案1】:

    错误消息在第 4 行末尾显示:connect ETIMEDOUT,我认为这意味着 Yarn 在下载 package.json 文件时超时。

    我刚刚尝试将 URL 粘贴到浏览器中并加载,所以如果您再试一次,它可能会正常工作!

    【讨论】:

    • 好的,取得进展! raw.githubusercontent.com 被我的 ISP(网络钓鱼/恶意软件,叹息......)阻止,所以我已将其列入白名单。现在我收到一个错误error Received malformed response from registry for undefined. The registry may be down.
    • 嗯,这听起来像是被阻止的类似问题。不确定它是否会有所帮助,但也许可以尝试yarn install --verbose 以获得更多调试输出?
    • 完全关闭了 ISP Blocking 系统,现在一切正常!谢谢你的帮助。 (不感谢 Sky Internet)。
    • 好吧,如果你使用的是 Github,那么你显然是个黑客,应该被阻止 ?
    猜你喜欢
    • 1970-01-01
    • 2018-08-04
    • 2017-10-27
    • 2019-01-23
    • 1970-01-01
    • 1970-01-01
    • 2018-10-27
    • 1970-01-01
    • 2018-10-09
    相关资源
    最近更新 更多