Hexo博客部署常见错误!!

问题描述

错误1:执行“hexo d”出现:ERROR Deployer not found git

如果出现ERROR_Deployer_not_found:git 报错,可以使用npm install --save hexo-deployer-git命令解决。

在博客blog根目录下运行以下代码

1
npm install --save hexo-deployer-git

然后执行:

hexo c , hexo g , hexo d ,一键三连…

错误2:执行“hexo d”出现:FATAL err: Error: Spawn failed

1
2
3
4
5
6
7
8
FATAL {
err: Error: Spawn failed
at ChildProcess.<anonymous> (D:\wwwroot\Hexo-Blog\node_modules\hexo-util\lib\spawn.js:51:21)
at ChildProcess.emit (node:events:513:28)
at ChildProcess.cp.emit (D:\wwwroot\Hexo-Blog\node_modules\cross-spawn\lib\enoent.js:34:29)
at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12) {
code: 128
}

用git bash here打开博客,在博客根目录下运行以下代码

rm -rf .git清除博客里原项目的git版本信息!!

1
rm -rf .git

然后执行 git init 命令(当前项目的目录中生成本地的git管理)

1
git init 

然后在执行一遍:

hexo c , hexo g , hexo d ,一键三连…


成功部署!!!!