首页 > 其他分享 >vue-element-admin 安装第三包(npm install)时报错

vue-element-admin 安装第三包(npm install)时报错

时间:2022-12-14 23:00:56浏览次数:79  
标签:npm vue ERR admin github -- git com

主要报错信息:ls-remote ssh://[email protected]/adobe-webplatform/eve.git

npm ERR! code 128
npm ERR! git dep preparation failed
npm ERR! command D:\nodejs\node.exe D:\nvm\v16.14.0\node_modules\npm\bin\npm-cli.js install --force --cache=C:\Users\AppData\Local\npm-cache --prefer-offline=false --prefer-online=false --offline=false --no-progress --no-save --no-audit --include=dev --include=peer --include=optional --no-package-lock-only --no-dry-run
npm ERR! npm WARN using --force Recommended protections disabled.
npm ERR! npm ERR! code 128
npm ERR! npm ERR! A git connection error occurred
npm ERR! npm ERR! command git --no-replace-objects ls-remote ssh://[email protected]/adobe-webplatform/eve.git
npm ERR! npm ERR! kex_exchange_identification: read: Connection reset by peer
npm ERR! npm ERR! Connection reset by 20.205.243.166 port 22
npm ERR! npm ERR! fatal: Could not read from remote repository.
npm ERR! npm ERR!
npm ERR! npm ERR! Please make sure you have the correct access rights
npm ERR! npm ERR! and the repository exists.
npm ERR!
npm ERR! npm ERR! A complete log of this run can be found in:
npm ERR! npm ERR!     C:\Users\AppData\Local\npm-cache\_logs\2022-03-04T08_29_17_072Z-debug-0.log072Z-debug-0.log

npm ERR! A complete log of this run can be found in:                                      g-0.log
npm ERR!     C:\Users\AppData\Local\npm-cache\_logs\2022-03-04T08_27_27_482Z-debug-0.log
解决方案1

修改Git的协议(ssh 替换为 https)

git config --global url."https://github.com/".insteadOf "ssh://[email protected]/"

如果电脑能正常访问 github 是没有问题的,但是国内环境经常被墙,所以还是会失败。
装个 fastgithub 并运行可以解决
fastgithub 使用说明:https://zhuanlan.zhihu.com/p/428454772
fastgithub 下载地址:https://github.com/dotnetcore/fastgithub/releases
github 下载可能很慢,这里给个百度盘的下载地址:链接:https://pan.baidu.com/s/17PiDQU1jaXftKtSjwjocJg 提取码:6666

这样基本上就不会有什么问题了。

解决方案2

这里再提供一个镜像网站的方案:

git config --global url."https://hub.fastgit.xyz/".insteadOf "ssh://[email protected]/"

标签:npm,vue,ERR,admin,github,--,git,com
From: https://www.cnblogs.com/superfeeling/p/16983918.html

相关文章

  • Vue事件的处理
    事件的基本使用:              1.使用v-on:xxx或@xxx绑定事件,其中xxx是事件名;              2.事件的回调......
  • VUE简介
    一.前后端分离既然我们在开发中使用前后端分离模式,也就是前端拿到后端的数据时怎么处理,怎么输出都有前端自己来实现,这样就需要写大量的js代码,而为了简化js的代码,就衍生出了......
  • Vue的浏览器中的 webStorage
    Vue的浏览器中的 webStorage1:Api介绍/*webStorage存储内容大小一般支持5MB左右(不同浏览器可能还不一样)浏览器端通过Window.sessionStorage和Window.localStorage......
  • VUE简介
    一.前后端分离既然我们在开发中使用前后端分离模式,也就是前端拿到后端的数据时怎么处理,怎么输出都有前端自己来实现,这样就需要写大量的js代码,而为了简化js的代码,就衍生出......
  • 前端工程化<npm、cnpm、yarn、npx、pnpm等包管理工具>
    平时工作中,像npm、cnpm、yarn等一些工具都是经常经常用的,但可能对里面的一些细节都没太在意,所以这篇就来总结一下加深印象和理解。另外还有pnpm的使用,以及它的优势1.npm包......
  • vue el-upload 上传拖拽排序
    <template><!--省略其他配置--><el-uploadref="upload":file-list.sync="fileList"></el-upload></template><script>importSortablefrom'sortablejs......
  • vue3.0--setup()
    1.setup()定义:setup()是vue3新增加的组件。vue3采用了组合式 API ,为了使用组合式API,我们需要一个入口,在vue3组件中,称之为setup。(简单点来说,就是vue2里面的data,me......
  • vue2 自定义指令22 directives 简写 全局自定义
      <pv-color="'red'">测试</p>  <button@click="color='green'">改变color的颜色值</button> data(){  return{   color:'blue' ......
  • vue 里面通过v-for循环出来多个相同样式的div,根据index值给每个div添加不同的id名
    直接上代码 两个要点:1、v-for循环创建盒子2、使用函数给盒子id赋值  函数方法  ......
  • Vuex 详解
    state:import{Module,VuexModule}from'vuex-module-decorators'@ModuleexportdefaultclassVehicleextendsVuexModule{wheels=2}等同于下面的代......