【问题标题】:npm install shows error with git not foundnpm install 显示错误,找不到 git
【发布时间】:2019-10-21 17:49:36
【问题描述】:

我最近在包JSON中添加了一些依赖项并尝试安装npm,但它显示与git not found相关的错误:

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

【问题讨论】:

标签: node.js angular git npm angular7


【解决方案1】:

你需要在你的机器上 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

【讨论】:

    【解决方案2】:

    就我而言,我安装了 Git,但只能从 Git Bash 访问它(我在安装时选择了下面的第一个选项)。我重新安装了第二个选项,它解决了这个问题:

    【讨论】:

    • 这里也一样。并且不要忘记重启,否则cmd中将无法使用git命令。
    猜你喜欢
    • 2014-08-30
    • 2017-12-25
    • 2016-12-23
    • 2014-11-17
    • 2017-05-30
    • 1970-01-01
    • 1970-01-01
    • 2014-05-25
    • 2023-01-08
    相关资源
    最近更新 更多