我尝试安装 Phonegap 所以我在命令提示符下运行命令
npm install -g phonegap
但是它会引发错误,例如 GIT ,但我已经安装了 GIT 。
请建议以下错误。提前谢谢。
C:\Users\bellamks>npm install -g phonegap
npm WARN addRemoteGit Error: not found: git
npm ERR! npm ERR! Failed using git. npm ERR! This is most likely not a
problem with npm itself. npm ERR! Please check if you have git
installed and in your PATH.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\bellamks\npm-debug.log
答案 0 :(得分:0)
向你的PATH添加git的最简单方法是解压缩(你想要的任何地方)PortableGit-2.4.6-5th-release-candidate-64-bit.7z.exe
。
将%PATH%
添加到str.split()
。 (参见" Adding directory to PATH Environment Variable in Windows")