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删除,然后把引入它的地方注释掉,

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐