开发者社区> 问答> 正文

npm安装依赖包报错?报错

我在安装npm依赖包时,比如npm install express -g,他会显示安装错误,错误信息为:

C:\Windows\system32>npm install express -g
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "D:\\Program Files\\nodejs\\node.exe" "D:\\Program Files\\nodejs\\
node_modules\\npm\\bin\\npm-cli.js" "install" "express" "-g"
npm ERR! node v5.6.0
npm ERR! npm  v3.6.0
npm ERR! code ECONNRESET

npm ERR! network tunneling socket could not be established, cause=write EPROTO 1
01057795:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:ope
nssl\ssl\s23_clnt.c:794:
npm ERR! network
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 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! Please include the following file with any support request:
npm ERR!     C:\Windows\system32\npm-debug.log
我检查过我的代理是没有问题的,网络应该也没什么问题,请问有哪位大神可以指点一下?

展开
收起
爱吃鱼的程序员 2020-06-09 16:01:16 901 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    多试几遍,或者换用国内的源(可能也要多试几遍)回复<aclass='referer'target='_blank'>@yingfeijiuji:可以先整个虚拟机什么的试试回复<aclass='referer'target='_blank'>@我叫头条:谢谢啊,我安装的是我们公司的工程环境,node的版本要求已经定下来了改不了了T^T,实在不行我只能重装系统了回复<aclass='referer'target='_blank'>@yingfeijiuji:刚试了一下安装成功了,4.4.2的版本,你要不换node版本试试我试了两三天了,你觉得有什么可能导致的

    2020-06-09 16:01:32
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
基于webpack和npm的前端组件化实践 立即下载
基于FAAS构建NPM同步CDN 立即下载
低代码开发师(初级)实战教程 立即下载

相关镜像