`There appears to be trouble with your network connection. Retrying`
下載包太大,導致超時。
如果有網速比較快的代理服務器的話, 可以配置http和https訪問的代理。
1. 系統層級設置網絡代理。
2. 使用yarn 設置代理服務器
3. 增加yarn 下載包的超時時間設置
4. npm
5. 切換下載鏡像源
## 設置網絡代理
#### Linux 中設置代理
1. 在 `/etc/apt/apt.conf` 或者 `/etc/environment` 配置
```
Acquire::http::proxy "http://username:password@proxy:port";
Acquire::https::proxy "http://username:password@proxy:port";
Acquire::ftp::proxy "http://username:password@proxy:port";
```
2. 在.bashrc中配置代理
```
export http_proxy="http://username:password@proxy:port";
export https_proxy="http://username:password@proxy:port";
export HTTPS_PROXY="http://username:password@proxy:port"
export HTTP_PROXY="http://username:password@proxy:port"
```
## yarn 設置網絡代理
```
yarn config set proxy http://username:password@host:port
yarn config set https-proxy http://username:password@host:port
```
## 增加yarn 下載包的超時時間設置
`yarn install --network-timeout=100000`
這里設置為100秒
## npm 設置代理
```
npm config set registry http://registry.npmjs.org/
npm config set proxy http://username:mypassword@proxy:port
npm config set https-proxy http://username:mypassword@proxy:port
npm config set strict-ssl false
npm --proxy http://myusername:mypassword@proxy.us.somecompany:8080 --without-ssl --insecure -g install
```
## 切換下載鏡像源
```
yarn config set registry https://registry.npm.taobao.org
```
通過 `npm config ls` 可以查看是否更改成功。
備注:
如果有多個鏡像源, 可以使用nrm 進行管理, nrm 是一個 npm 源管理器
1. 全局安裝nrm: `npm install nrm -g`
2. 查看鏡像源: `nrm ls`
3. 切換鏡像源: `nrm use npm`
4. 安裝需要的模塊: `npm install <package-name>`
5. 如果需要安裝全部依賴: `npm install`
## 方法
1.單個依賴下載
`yarn add xxx -W`
`yarn add <yourPackage> --network-timeout 100000`
3. 多跑幾次
4. 更換鏡像
默認的registry 是 https://registry.yarnpkg.com, 更換成淘寶的 https://registry.npm.taobao.org
```
yarn config list
yarn config delete proxy
npm config rm proxy
npm config rm https-proxy
yarn config set registry https://registry.npm.taobao.org
```
- 引入篇
- 基礎篇
- 快速入手
- 名詞解釋
- Vue語法
- Vue安裝
- Vue實例
- 模板語法
- 計算屬性和偵聽器
- Class與Style綁定
- 條件渲染
- 列表渲染
- 事件處理
- 表單輸入綁定
- 組件基礎
- 進階篇
- 常用模塊
- 單文件組件
- 快速學會Vue Router路由
- Vue Route 進階使用
- Vuex 與狀態管理
- Axios
- Mock.js
- data數據顯示在頁面
- Vue生命周期
- Vue按需加載組件
- 國際化
- 頁面加載進度條 -NProgress
- 自定義主題顏色
- 開發篇
- Vue入門——創建并運行一個Vue項目
- Vue + Element UI 項目創建
- 使用Vue ui項目創建工具在網頁中創建Vue項目
- Vue項目創建入門實例
- Vue CLI
- 創建項目
- 使用Visual Studio Code 開發Vue項目
- 高級篇
- 組件深入
- Vue+Element
- Vue + ElementUI 主題顏色切換
- 工具篇
- 在線代碼編輯器
- 開發工具(IDE,集成開發環境)
- npm(JavaScript包管理工具)介紹
- Node.js(npm)在Windows下安裝
- webpack介紹
- webpack快速實例
- webpack
- 快速入門實例
- 安裝
- 概念
- Nodejs
- 基礎
- npm
- 命令參考
- 命令
- 模塊安裝
- Babel
- 問題解決篇
- ERROR Failed to get response from https://registry.yarnpkg.com/vue-cli-version -marker
- Vue常見問題
- You are using the runtime-only build of Vue where the template compiler is not
- yarn 報unable to get local issuer certificate
- yarn There appears to be trouble with your network connection. Retrying
- Expected Boolean, got String with value "true".
- 項目篇
- 項目創建
- 項目設計
- 頁面
- 開發問題
- 后端
- Spring Boot + Activiti 工作流框架搭建之一
- Spring Boot + Activiti 工作流框架搭建之二
- 工作流
- Java流程框架
- Activiti
- 頁面風格
- green
- blue
- orange
- 參考篇
- 好的Git項目
- Vue的在線js
- 指令
- 開發說明
- JavaScript 高級
- export和import
- JS模塊化規范對比以及在Node.js的實現
- Storage
- ES2015
- scss
- CSS、Sass、SCSS