node.js - 我的代理有什么问题,它不起作用?
问题描述
我不知道发生了什么,因为互联网对我有用。但是我不复制git仓库也不去github git bash
Rahat@Rahat-PC MINGW32 /c/users/rahat/downloads
$ git clone https://github.com/RahatMelsov/django-blog-app.git
Cloning into 'django-blog-app'...
fatal: unable to access 'https://github.com/RahatMelsov/django-blog-app.git/': Could not resolve host: github.com
Rahat@Rahat-PC MINGW32 /c/users/rahat/downloads
当我想使用 node.js 从 NPM 安装某种模块时,它会产生这样的错误: cmd
C:\Users\Rahat>npm install --save react react-dom
npm ERR! code ENOTFOUND
npm ERR! errno ENOTFOUND
npm ERR! network request to https://registry.npmjs.org/react failed, reason: get
addrinfo ENOTFOUND registry.npmjs.org registry.npmjs.org:443
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settin
gs.
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! A complete log of this run can be found in:
npm ERR! C:\Users\Rahat\AppData\Roaming\npm-cache\_logs\2019-09-27T20_29_06_
174Z-debug.log
我认为这是因为我的代理,因为这个“词”无处不在。也许wi-fi有问题?
解决方案
因为互联网对我有用
不,它没有
但我不复制 git 存储库
正如来自 git 的错误消息所解释的那样,问题不在于 git,而在于您的 MING 子系统的互联网连接。
如果你不明白 git 告诉你什么,npm 会用不同的词告诉你同样的事情。
如果 npm 在 MS-Windows 中而不是在 MING 下本机运行,则机器上的任何内容都无法与 Internet 通信。
也许wi-fi有问题?
我以为你说互联网对你有用?
推荐阅读
- python - 从 OpenModelica 生成的 .mat 文件中导出 .csv 文件
- visual-studio-2019 - 使用 Visual Studio 2019 中的一个登录按钮进行管理员和用户登录
- flutter - 如何设置 Switch 的 onChanged 值
- angular - .Net Core Windows 身份验证,授权访问特定 AD 组
- java - Android Studio getSupportFragment.beginTransaction().replace 在导航到另一个片段(Java)时导致崩溃
- angular - 通过 S3-cloudfornt 托管 Angular 网站时出现安全上下文错误
- struct - 选择排序和二分查找
- vue.js - vue 编程 this.$router.go(-1) 不要回头
- selenium-webdriver - 如何通过 Selenium 获取所有网页的链接(不仅仅是驱动程序所在的页面)?
- vscode-settings - 默认终端设置