Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/37.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript Npm安装始终为所有软件包返回“code ECONREFUNCED”错误_Javascript_Node.js_Npm - Fatal编程技术网

Javascript Npm安装始终为所有软件包返回“code ECONREFUNCED”错误

Javascript Npm安装始终为所有软件包返回“code ECONREFUNCED”错误,javascript,node.js,npm,Javascript,Node.js,Npm,我尝试了代理设置,注册表设置命令,但仍然没有用 我正在使用node js最新版本..我的应用程序监听端口是3000 我尝试了npm配置列表。是否有错误的配置 `npm ERR! code ECONNREFUSED npm ERR! errno ECONNREFUSED npm ERR! FetchError: request to http://registry.npmjs.org/body-parser failed, reason: connect ECONNREFUSED 127.0.

我尝试了
代理设置
注册表设置命令
,但仍然没有用

我正在使用node js最新版本..我的应用程序监听端口是
3000

我尝试了npm配置列表。是否有错误的配置

`npm ERR! code ECONNREFUSED
 npm ERR! errno ECONNREFUSED
 npm ERR! FetchError: request to http://registry.npmjs.org/body-parser failed, reason: connect ECONNREFUSED 127.0.0.1:3000`

`

如果您使用的是公司代理,则连接可能会被拒绝,因为用户身份验证失败

将代理地址更改为
”http://username:password@proxy.company.com:port“


这将有望解决您的问题。

如果您使用的是公司代理,连接可能会被拒绝,因为用户身份验证失败

将代理地址更改为
”http://username:password@proxy.company.com:port“


这将有望解决您的问题。

检查您的
主机
文件:
$cat/private/etc/hosts
可能重复的@Maxim,您能给我发短信告诉我确切的路径吗
cat/private/etc/hosts
?@Maximo我尝试了这些方法..仍然得到相同的错误..请查看我更新的问题检查您的
主机
文件:
$cat/private/etc/hosts
可能与@Maxim重复您能给我发短信告诉我确切的路径吗
cat/private/etc/hosts
?@Maximo我尝试了这些方法..仍然出现相同的错误..请查看我更新的问题
 `; cli configs
 metrics-registry = "https://registry.npmjs.org/"
  scope = ""
 user-agent = "npm/5.3.0 node/v8.1.4 win32 ia32"

; userconfig C:\Users\JANEN\.npmrc
https-proxy = "http://proxy.company.com:8080/"
proxy = "http://proxy.company.com:8080/"
registry = "https://registry.npmjs.org/"

; builtin config undefined
prefix = "C:\\Users\\JANEN\\AppData\\Roaming\\npm"

 ; node bin location = C:\Program Files (x86)\nodejs\node.exe
; cwd = C:\project\authenticationIntro-master
; HOME = C:\Users\JANEN
; "npm config ls -l" to show all defaults.