gpt4 book ai didi

node.js - 安装: react-native init fails - Apparent network issue

转载 作者:太空宇宙 更新时间:2023-11-04 02:16:45 25 4
gpt4 key购买 nike

我正在尝试在我的 Mac 上安装 React Native。一切都很顺利,直到我到达“react-native init”部分。

终端给我这条消息:

X's-imac-2:~ Y$ react-native init NewProj This will walk you through creating a new React Native project in /Users/Y/NewProj Installing react-native package from npm...

npm ERR! Darwin 15.0.0 npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "--save" "react-native" npm ERR! node v5.5.0 npm ERR! npm v3.5.3 npm ERR! code ETIMEDOUT npm ERR! errno ETIMEDOUT npm ERR! syscall connect

npm ERR! network connect ETIMEDOUT 23.235.40.162:443 npm ERR! network This is most likely not a problem with npm itself npm ERR! network and is related to network connectivity. npm ERR! network In most cases you are behind a proxy or have bad network settings. npm ERR! network npm ERR! network If you are behind a proxy, please make sure that the npm ERR! network 'proxy' config is set properly. See: 'npm help config'

npm ERR! Please include the following file with any support request: npm ERR! /Users/Y/NewProj/npm-debug.log

npm install --save react-native` failed

我的网络很好,我已经测试过 ping 服务器并且它有效。也不在代理后面。我已经多次尝试初始化。

可能出了什么问题?另外有人可以解释一下react-native init 的工作原理吗?就像我只是命名我的项目名称还是我遗漏了什么?

最佳答案

我知道这看起来很愚蠢。我在 Windows 上遇到了类似的问题。一旦我暂停了病毒防护,它就工作得很好。

您还可以展示一下您在此处执行的步骤吗?这不太可能与安装有关,但这些 npm 有时会表现得很奇怪。

关于node.js - 安装: react-native init fails - Apparent network issue,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35383977/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com