首页 技术 正文
技术 2022年11月19日
0 收藏 385 点赞 2,447 浏览 5582 个字

1、at process._tickCallback (internal/process/next_tick.js:188:7)  npm ERR! message: ‘request to https://registry.npm.taobao.org/vue-cli failed, reason: connect ECONNREFUSED 127.0.0.1:1080’,

1)报错信息大概如下:

 E:\WebStormFile\labSystem>npm i -g vue-cli
npm ERR! code ECONNREFUSED
npm ERR! errno ECONNREFUSED
npm ERR! FetchError: request to https://registry.npm.taobao.org/vue-cli failed, reason:
connect ECONNREFUSED 127.0.0.1:1080
npm ERR! at ClientRequest.req.on.err (E:\ProgramFiles\nodejs\node_modules\npm\node_
modules\pacote\node_modules\make-fetch-happen\node_modules\node-fetch-npm\src\index.js:
68:14)
npm ERR! at emitOne (events.js:116:13)
npm ERR! at ClientRequest.emit (events.js:211:7)
npm ERR! at onerror (E:\ProgramFiles\nodejs\node_modules\npm\node_modules\pacote\no
de_modules\make-fetch-happen\node_modules\https-proxy-agent\node_modules\agent-base\ind
ex.js:106:9)
npm ERR! at callbackError (E:\ProgramFiles\nodejs\node_modules\npm\node_modules\pac
ote\node_modules\make-fetch-happen\node_modules\https-proxy-agent\node_modules\agent-ba
se\index.js:126:5)
npm ERR! at <anonymous>
npm ERR! at process._tickCallback (internal/process/next_tick.js:188:7)
npm ERR! { FetchError: request to https://registry.npm.taobao.org/vue-cli failed, reas
on: connect ECONNREFUSED 127.0.0.1:1080
npm ERR! at ClientRequest.req.on.err (E:\ProgramFiles\nodejs\node_modules\npm\node_
modules\pacote\node_modules\make-fetch-happen\node_modules\node-fetch-npm\src\index.js:
68:14)
npm ERR! at emitOne (events.js:116:13)
npm ERR! at ClientRequest.emit (events.js:211:7)
npm ERR! at onerror (E:\ProgramFiles\nodejs\node_modules\npm\node_modules\pacote\no
de_modules\make-fetch-happen\node_modules\https-proxy-agent\node_modules\agent-base\ind
ex.js:106:9)
npm ERR! at callbackError (E:\ProgramFiles\nodejs\node_modules\npm\node_modules\pac
ote\node_modules\make-fetch-happen\node_modules\https-proxy-agent\node_modules\agent-ba
se\index.js:126:5)
npm ERR! at <anonymous>
npm ERR! at process._tickCallback (internal/process/next_tick.js:188:7)
npm ERR! message: 'request to https://registry.npm.taobao.org/vue-cli failed, reason:
connect ECONNREFUSED 127.0.0.1:1080',
npm ERR! type: 'system',
npm ERR! errno: 'ECONNREFUSED',
npm ERR! code: 'ECONNREFUSED',
npm ERR! stack: 'FetchError: request to https://registry.npm.taobao.org/vue-cli faile
d, reason: connect ECONNREFUSED 127.0.0.1:1080\n at ClientRequest.req.on.err (E:\\Pr
ogramFiles\\nodejs\\node_modules\\npm\\node_modules\\pacote\\node_modules\\make-fetch-h
appen\\node_modules\\node-fetch-npm\\src\\index.js:68:14)\n at emitOne (events.js:11
6:13)\n at ClientRequest.emit (events.js:211:7)\n at onerror (E:\\ProgramFiles\\n
odejs\\node_modules\\npm\\node_modules\\pacote\\node_modules\\make-fetch-happen\\node_m
odules\\https-proxy-agent\\node_modules\\agent-base\\index.js:106:9)\n at callbackEr
ror (E:\\ProgramFiles\\nodejs\\node_modules\\npm\\node_modules\\pacote\\node_modules\\m
ake-fetch-happen\\node_modules\\https-proxy-agent\\node_modules\\agent-base\\index.js:1
26:5)\n at <anonymous>\n at process._tickCallback (internal/process/next_tick.js:
188:7)' }
npm ERR!
npm ERR! If you are behind a proxy, please make sure that the
npm ERR! 'proxy' config is set properly. See: 'npm help config' npm ERR! A complete log of this run can be found in:
npm ERR! E:\ProgramFiles\nodejs\node_cache\_logs\2019-11-20T07_33_07_386Z-debug.log

2)原因:npm配置了代理(可以使用”  npm config list -l  “命令查看npm配置)

 E:\WebStormFile\labSystem>npm config list -l
; cli configs
long = true
metrics-registry = "https://registry.npm.taobao.org/"
scope = ""
user-agent = "npm/5.6.0 node/v8.11.3 win32 x64" ; userconfig C:\Users\25392\.npmrc
cache = "E:\\ProgramFiles\\nodejs\\node_cache"
cacheE:\ProgramFiles\nodejs\node_cache = ""
home = "https://www.npmjs.org"
https-proxy = "http://127.0.0.1:1080/"
prefix = "E:\\ProgramFiles\\nodejs\\node_global"
prefixE:\ProgramFiles\nodejs\node_cache = ""
prefixE:\ProgramFiles\nodejs\node_global = ""
proxy = null
registry = "https://registry.npm.taobao.org/" ; default values
access = null
allow-same-version = false
also = null
always-auth = false
auth-type = "legacy"
bin-links = true
browser = null
ca = null
; cache = "C:\\Users\\25392\\AppData\\Roaming\\npm-cache" (overridden)
cache-lock-retries = 10
cache-lock-stale = 60000
cache-lock-wait = 10000
cache-max = null
cache-min = 10
cafile = undefined
cert = null
cidr = null
color = true
commit-hooks = true
depth = null
description = true
dev = false
dry-run = false
editor = "notepad.exe"
engine-strict = false
fetch-retries = 2
fetch-retry-factor = 10
fetch-retry-maxtimeout = 60000
fetch-retry-mintimeout = 10000
force = false
git = "git"
git-tag-version = true
global = false
global-style = false
globalconfig = "E:\\ProgramFiles\\nodejs\\node_global\\etc\\npmrc"
globalignorefile = "E:\\ProgramFiles\\nodejs\\node_global\\etc\\npmignore"
group = 0
ham-it-up = false
heading = "npm"
; https-proxy = null (overridden)
if-present = false
ignore-prepublish = false
ignore-scripts = false
init-author-email = ""
init-author-name = ""
init-author-url = ""
init-license = "ISC"
init-module = "C:\\Users\\25392\\.npm-init.js"
init-version = "1.0.0"
json = false
key = null
legacy-bundling = false
link = false
local-address = undefined
loglevel = "notice"
logs-max = 10
; long = false (overridden)
maxsockets = 50
message = "%s"
; metrics-registry = null (overridden)
node-options = null
node-version = "8.11.3"
offline = false
onload-script = null
only = null
optional = true
otp = 0
package-lock = true
package-lock-only = false
parseable = false
prefer-offline = false
prefer-online = false
; prefix = "E:\\ProgramFiles\\nodejs" (overridden)
production = false
progress = true
proxy = null
read-only = false
rebuild-bundle = true
; registry = "https://registry.npmjs.org/" (overridden)
rollback = true
save = true
save-bundle = false
save-dev = false
save-exact = false
save-optional = false
save-prefix = "^"
save-prod = false
scope = ""
script-shell = null
scripts-prepend-node-path = "warn-only"
searchexclude = null
searchlimit = 20
searchopts = ""
searchstaleness = 900

3)使用” npm config delete https-proxy “命令删除配置  (https-proxy = “http://127.0.0.1:1080/”)就可以正常下载啦

2、

相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,077
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,552
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,400
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,176
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:7,812
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:4,894