npm install显示找不到git的错误 [英] npm install shows error with git not found

查看:667
本文介绍了npm install显示找不到git的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近向package.JSON添加了一些依赖项,并尝试安装npm.但显示与找不到git相关的错误

I have recently added some dependencies to the package.JSON and tried installing npm . but it shows errors related to git not found

错误屏幕截图

npm ERR!路径git
npm ERR!代码ENOENT
npm ERR! errno ENOENT
npm ERR! syscall生成git
npm ERR! enoent执行时出错:
npm ERR! enoent未定义ls-remote -h -t ssh://git@github.com/eligrey/FileSaver.js.git
npm ERR! enoent
npm ERR! enoent
npm ERR! enoent生成git ENOENT
npm ERR! enoent这与npm无法找到文件有关. npm ERR! enoent
npm ERR!可以在以下位置找到此运行的完整日志:

npm ERR! path git
npm ERR! code ENOENT
npm ERR! errno ENOENT
npm ERR! syscall spawn git
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t ssh://git@github.com/eligrey/FileSaver.js.git
npm ERR! enoent
npm ERR! enoent
npm ERR! enoent spawn git ENOENT
npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent
npm ERR! A complete log of this run can be found in:

图片

推荐答案

您需要安装 git使其正常工作.

You need to install git in your machine to have it working.

undefined ls-remote -h -t ssh://git@github.com/eligrey/FileSaver.js.git

应该已经

git ls-remote -h -t ssh://git@github.com/eligrey/FileSaver.js.git

存在与git path相关的错误. 选中此ls-remote命令

There is error related to git path. check this ls-remote command

这篇关于npm install显示找不到git的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆