我最近向 package.JSON 添加了一些依赖项并尝试安装 npm 。但它显示了与 git not found 相关的错误
Error Screenshot
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:
Image
最佳答案
您需要install git
在你的机器上让它工作。
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 路径相关的错误。 check this ls-remote command
关于node.js - npm install 显示错误,找不到 git,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56473680/