npm install返回syscall生成git错误 [英] npm install returns syscall spawn git error

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

问题描述

我尝试运行npm install并在下面遇到了这些问题

I've tried to run npm install and faced these issues below

我尝试使用强制命令清除缓存,安装git并更新节点,但无济于事

I've tried to clear cache with force command, install git and update node but nothing worked

这是错误

npm ERR! code ENOENT
npm ERR! syscall spawn git
npm ERR! path git
npm ERR! errno ENOENT
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:
npm ERR!     C:\Users\UserName\AppData\Roaming\npm-cache\_logs\2019-11-01T11_56_42_862Z-debug.log

有人可以帮我解决这个问题吗?

Can someone help me resolve this?

推荐答案

确保已在设备上安装了GIT,并且可以全局访问该GIT.尝试在CMD中键入git -v.如果返回该命令未被识别并且已经安装了GIT,则需要将其添加到PATH环境变量中,并确保使用新的CMD会话尝试该命令

Make sure you have the GIT installed on your device and accessible globally. Try to type git -v in the CMD. If it returned that the command is not recognized and GIT already installed, then you need to add it to the PATH environment variable and make sure to try the command using a new CMD session

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

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