我的代理有什么问题,它不起作用?

时间:2019-09-27 20:35:47

标签: node.js git npm server

我不知道发生了什么,因为互联网对我有用。但是我不复制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可能有问题?

enter image description here

2 个答案:

答案 0 :(得分:0)

  

因为互联网对我有用

不,不是

  

但是我不复制git存储库

由于git的错误消息解释了问题不在于git,而是来自MING子系统的Internet连接。

如果您不了解git在告诉您什么,npm会用不同的词告诉您同一件事。

如果npm在MS-Windows中而不是在MING下本地运行,则计算机上没有任何内容可以与Internet通讯。

  

Wi-Fi可能有问题吗?

我以为你说互联网正在为你服务?

答案 1 :(得分:0)

创建一个 .npmrc 文件(如果不可用)并进行代理设置。

情况1:您的个人或办公系统,不需要代理。

While i < 10:
            self.p{i} = tk.Entry(tk.Frame,
                        width=12).grid(row=2, column=i, pady=10) 
                        # self.p{i} is where i'm stuck

情况2:需要Office系统和代理。

registry=http://registry.npmjs.org/