weixin_69095916 2022-10-03 22:56 采纳率: 100%
浏览 82
已结题

hexo next主题 hexo d 时出现Error: Spawn failed

hexo框架 主题是NeXT 工具是 git bash here
我的next 版本是7.8.0
每次我尝试修改它的配置,改动某部分的内容,比如修改next的主题
之后本地查看是正常的
但是当我用hexo d 指令部署到GitHub上面时
常常会报错如下:

$ hexo d
INFO  Validating config
INFO  Deploying: git
INFO  Clearing .deploy_git folder...
INFO  Copying files from public folder...
INFO  Copying files from extend dirs...
[master 5072da2] Site updated: 2022-10-03 22:38:59
 9 files changed, 18 insertions(+), 18 deletions(-)
fatal: unable to access 'https://github.com/goodcode/goodcode.github.io.git/': Failed to connect to github.com port 443 after 21032 ms: Timed out
FATAL Something's wrong. Maybe you can find the solution here: https://hexo.io/docs/troubleshooting.html
Error: Spawn failed
    at ChildProcess.<anonymous> (C:\blog\node_modules\hexo-util\lib\spawn.js:51:21)
    at ChildProcess.emit (node:events:526:28)
    at ChildProcess.cp.emit (C:\blog\node_modules\cross-spawn\lib\enoent.js:34:29)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)

试过了网上说的那种删除.deploy_git的方法,也试过改成SSH,都没有用,我觉得问题不是在这里
然后为了避免这个问题我就把修改的内容改掉,它就能正常部署了,但这样不是长久之计的,好像有的人说是格式的问题,我认为这才是根源,因为有一次我改的内容它是夹在单引号('')中间的,然后我把单引号删掉它就可以正常部署了。
可是这次报错的内容我看不太明白,无法具体情况具体解决,因为我其实啥也不懂的,没有编程基础,我很希望可以拥有自己的博客
谢谢了!
是因为我那个node 什么js的版本不匹配7.8.0的主题吗,因为我的node是几个月之前安装的,我记得有一次我随意浏览有看到next的版本好像也与这些有关

  • 写回答

1条回答 默认 最新

  • zhangrelay 机器人领域优质创作者 2022-10-05 07:38
    关注

    个人猜测,是不是网络不稳定?

    fatal: unable to access 'https://github.com/goodcode/goodcode.github.io.git/': Failed to connect to github.com port 443 after 21032 ms: Timed out
    

    字面意思是连接超时。

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论 编辑记录

报告相同问题?

问题事件

  • 系统已结题 10月13日
  • 已采纳回答 10月5日
  • 修改了问题 10月3日
  • 创建了问题 10月3日

悬赏问题

  • ¥15 win11家庭中文版安装docker遇到Hyper-V启用失败解决办法整理
  • ¥15 gradio的web端页面格式不对的问题
  • ¥15 求大家看看Nonce如何配置
  • ¥15 Matlab怎么求解含参的二重积分?
  • ¥15 苹果手机突然连不上wifi了?
  • ¥15 cgictest.cgi文件无法访问
  • ¥20 删除和修改功能无法调用
  • ¥15 kafka topic 所有分副本数修改
  • ¥15 小程序中fit格式等运动数据文件怎样实现可视化?(包含心率信息))
  • ¥15 如何利用mmdetection3d中的get_flops.py文件计算fcos3d方法的flops?