# npm error code 128 在裝vue-element-admin使用`npm install`和`yarn install` 皆會出現如下的錯誤訊息 ``` zsh= npm ERR! Error while executing: npm ERR! /usr/local/bin/git ls-remote -h -t git://github.com/adobe-webplatform/eve.git npm ERR! npm ERR! 致命錯誤: 無法連線到 github.com: npm ERR! github.com[0: 20.27.177.113]: errno=Operation timed out npm ERR! npm ERR! npm ERR! exited with error code: 128 ``` 在網上和CSDN博客爬文,找許多解法都行不通。 後來解決方式是: :::info 1. macOS版本更新到最新(13.1) 2. node版本用 16.15.0 -- `nvm use 16.15.0` 3. 在全域 ~/.gitconfig 新增內容: `$ git config --global url."https://".insteadOf git://` 4. 再執行`npm install` 或 `yarn install` ::: 原因是因為用 SSH 抓下來的網址為 git:// 導致執行 npm install 時的網址前綴會帶成 git:// 而非 https:// --- 參考: 1. https://smlpoints.com/guide-npm-install-exited-with-error-code-128.html 2. https://blog.csdn.net/itguangzhi/article/details/77771903