npm i 发生npm ERR! code 128 npm ERR An unknown git error occurred npm ERR! command g的错误(已解决)

npm i 发生npm ERR! code 128 npm ERR An unknown git error occurred npm ERR! command g的错误(已解决)_第1张图片

1.根据下图的提示先删除这样没用的文件和代码(有的没有就算了)

npm i 发生npm ERR! code 128 npm ERR An unknown git error occurred npm ERR! command g的错误(已解决)_第2张图片

2.然后继续npm i一次

如果此时又发生报错:
npm i 发生npm ERR! code 128 npm ERR An unknown git error occurred npm ERR! command g的错误(已解决)_第3张图片

3.然后执行npm i --legacy-peer-deps

npm i 发生npm ERR! code 128 npm ERR An unknown git error occurred npm ERR! command g的错误(已解决)_第4张图片
亲测有效

你可能感兴趣的:(合墨数据,npm,git,node.js)