找不到错误:git 在 windows 上安装 npm 包时

Error not found: git when install npm package on windows

我正在尝试使用 webstorm IDE.

在 windows 上通过 npm npm install bigwheel 安装这个包

我正在

"Error: not found: git" "This is most likely not a problme with npm itself. Please check if you have git installed and in yout Path"

我已经安装了 https://git-for-windows.github.io/,我该如何检查路径并修复这个错误?

请查找 git 安装在您机器上的哪个位置。例如C:\Program Files\Git\cmd 并将其附加到环境变量中的 PATH 变量。

要附加到路径,请按照以下步骤操作:

  1. 右键单击这台电脑我的电脑 & select 属性
  2. Select 高级系统设置
  3. Select 环境变量
  4. 系统变量中找到PATH变量
  5. Select 编辑 并附加此 路径
  6. 单击确定并重新启动命令提示符

附加此后从新命令提示符执行以下命令:

git --version

它应该显示如下内容:

git version 2.9.0.windows.1

完成这些步骤后,尝试安装npm包,看看问题是否解决。

在 Windows 中,环境...这里有 2 个问题: 安装SourceTree并不意味着安装了git.exe,所以你需要先安装最新版本 然后去 url (https://github.com/npm/npm/wiki/Troubleshooting) 并在我的项目为我解决问题的目录中重新安装 npm

您可以尝试 git cmd。我试着工作