美文网首页
解决hexo报错spwan failed

解决hexo报错spwan failed

作者: 无聊的CairBin | 来源:发表于2021-07-01 10:47 被阅读0次

报错1


FATAL {
  err: Error: Spawn failed
      at ChildProcess.<anonymous> (/usr/local/src/hexo/cairbin/node_modules/hexo-util/lib/spawn.js:51:21)
      at ChildProcess.emit (events.js:376:20)
      at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12) {
    code: 128
  }
} Something's wrong. Maybe you can find the solution here: %s https://hexo.io/docs/troubleshooting.html

解决方案

  • 进行以下处理
##进入博客根目录(以我的为例)
cd /usr/local/src/hexo/cairbin/

##删除git提交文件夹
rm -rf .deploy_git/

git config --global core.autocrlf false

  • 最后重新生成提交
hexo clean && hexo g && hexo d

在提交的过程可能又出现以下报错

报错2

! [remote rejected] master -> master (push declined due to email privacy restrictions)

解决方案

  • 这是因为你的github设置出了问题
  • 浏览器进入github.com
  • 登陆github -> "+" ->settings
  • 后续操作如下图
image
  • 将下方这两个设置取消勾选
image image
  • 重新提交
hexo clean && hexo g && hexo d

大功告成

如果不报错,重新访问页面,就发现已经提交成功了

相关文章

网友评论

      本文标题:解决hexo报错spwan failed

      本文链接:https://www.haomeiwen.com/subject/oyrjultx.html