在用Hexo搭建静态博客的时候,deploy时出现如下错误:
Error: spawn ENOENT
at errnoException (child_process.js:980:11)
at Process.ChildProcess._handle.onexit (child_process.js:771:34)
原因是:
在cmd中敲命令导致无法上传github,改为在git bash中deploy 后正常。因为可能当初装git时只使用 git bash,导致cmd中无法使用git命令。
网友评论
EEE { Error: spawn EACCES
at exports._errnoException (util.js:1020:11)
at ChildProcess.spawn (internal/child_process.js:328:11)
at exports.spawn (child_process.js:370:9)
at module.exports (/home/www/hexo/node_modules/hexo-admin/deploy.js:14:14)
at /home/www/hexo/node_modules/hexo-admin/api.js:413:7
at /home/www/hexo/node_modules/hexo-admin/api.js:141:7
at call (/home/www/hexo/node_modules/connect/index.js:239:7)
at next (/home/www/hexo/node_modules/connect/index.js:183:5)
at next (/home/www/hexo/node_modules/connect/index.js:161:14)
at next (/home/www/hexo/node_modules/connect/index.js:161:14)
at next (/home/www/hexo/node_modules/connect/index.js:161:14)
at next (/home/www/hexo/node_modules/connect/index.js:161:14)
at next (/home/www/hexo/node_modules/connect/index.js:161:14)
at next (/home/www/hexo/node_modules/connect/index.js:161:14)
at next (/home/www/hexo/node_modules/connect/index.js:161:14)
at next (/home/www/hexo/node_modules/connect/index.js:161:14)
at next (/home/www/hexo/node_modules/connect/index.js:161:14)
at next (/home/www/hexo/node_modules/connect/index.js:161:14)
at /home/www/hexo/node_modules/body-parser/lib/read.js:130:5
at invokeCallback (/home/www/hexo/node_modules/raw-body/index.js:224:16)
at done (/home/www/hexo/node_modules/raw-body/index.js:213:7)
at IncomingMessage.onEnd (/home/www/hexo/node_modules/raw-body/index.js:273:7) code: 'EACCES', errno: 'EACCES', syscall: 'spawn'
}