解决hexo报错spwan failed


报错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
  • 后续操作如下图

  • 将下方这两个设置取消勾选

  • 重新提交
hexo clean && hexo g && hexo d

大功告成

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


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM