解决 npm install的时候报npm ERR! exited with error code: 128
最近的项目,换了个电脑运行npm install 就突然报这个错了
npm ERR! Error while executing:
npm ERR! /usr/bin/git ls-remote -h -t git://github.com/adobe-webplatform/eve.git
npm ERR!
npm ERR! undefined
npm ERR! exited with error code: 128
查了一下,这个npm 128的错误是因为上面执行的git ls-remote git://xxxx出错,原因是新的电脑上没有可用的ssh密钥导致用git://协议拉代码报错。
直接在npm install前加一条
git config --global url."https://".insteadOf git://
npm install
完美解决,替换git:// 使用https://