vue-element-admin安装依赖的坑

1.从git 上拉 项目

git clone https://github.com/PanJiaChen/vue-element-admin.git

报错1:

$ git clone https://github.com/PanJiaChen/vue-element-admin.git
Cloning into 'vue-element-admin'...
fatal: unable to access 'https://github.com/PanJiaChen/vue-element-admin.git/': OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 10053


或者报错2:

$ git clone https://github.com/PanJiaChen/vue-element-admin.git
Cloning into 'vue-element-admin'...
fatal: unable to access 'https://github.com/PanJiaChen/vue-element-admin.git/': Failed to connect to github.com port 443: Timed out

解决方案:

将https改为git即可。

git clone git://github.com/PanJiaChen/vue-element-admin.git

2.npm install 安装依赖

报错:

fatal: unable to access 'https://github.com/nhn/raphael.git/': Failed to connect
 to github.com port 443: Timed out

解决方案:

设置http代理 https代理

执行git config --global http.proxy .

(取消代理 git config --global --unset http.proxy)

  • 查看当前镜像源
  • yarn config get registry
  • 切换成淘宝镜像源
  • yarn config set registry https://registry.npm.taobao.org

然后npm run dev, 莫名其妙就好使了,我还想看报错呢,不给我看,呵~

如果是yarn install安装,会出现这个报错:

报错1:

fatal: unable to access 'https://github.com/nhn/raphael.git/': Failed to connect
 to github.com port 443: Timed out

或者报错2:

Install fail! Error: [tui-editor@1.3.3 › tui-chart@3.11.3 › raphael@git+https://github.com/nhn/raphael.git#2.2.0-c] An unknown git error occurred

失败的原因是,国内服务器连接github速度很慢,导致下载这个包超时,这个包是tui-editor库的依赖,这个库又被MarkdownEditor组件使用。

解决方案:

在package.json里把tui-editor删除,然后把引入它的地方注释掉,

  • 4
    点赞
  • 17
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值