错误
hexo部署博客到GitHub上,执行hexo -d时,报如下错误
Error: spawn git ENOENT
at exports._errnoException (util.js:746:11)
at Process.ChildProcess._handle.onexit (child_process.js:1053:32)
at child_process.js:1144:20
at process._tickCallback (node.js:355:11)
原因
未添加Git环境变量/之前添加成功了但是由于某种原因,环境变量现在失效了
解决
重新添加Git到环境变量即可
Win10添加环境变量后截图: