您的位置:首页 > 其它

hexo生成的页面部署到git上面时报错 FATAL spawn git ENOENT

2016-05-26 00:00 423 查看
摘要: windows下使用hexo d指令将博客部署到github上时报FATAL spawn git ENOENT错误的解决方案

windows下使用hexo d指令将博客部署到github上时经常会报FATAL spawn git ENOENT错误,是因为使用cmd执行的这条指令,改成使用git bash执行就不会报错了。

报错信息
FATAL spawn git ENOENT
Error: spawn git ENOENT

at notFoundError (C:\Users\Administrator\Desktop\Hexo\node_modules\hexo-depl
oyer-git\node_modules\hexo-util\node_modules\cross-spawn\node_modules\cross-spaw
n-async\lib\enoent.js:8:11)
at verifyENOENT (C:\Users\Administrator\Desktop\Hexo\node_modules\hexo-deplo
yer-git\node_modules\hexo-util\node_modules\cross-spawn\node_modules\cross-spawn
-async\lib\enoent.js:43:16)
at ChildProcess.cp.emit (C:\Users\Administrator\Desktop\Hexo\node_modules\he
xo-deployer-git\node_modules\hexo-util\node_modules\cross-spawn\node_modules\cro
ss-spawn-async\lib\enoent.js:30:19)
at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
解决方案:

之前使用cmd执行的hexo d ,改成使用git bash执行就成功了。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: