本文最后更新于:2023年12月5日 下午

在写博客时,生成正常,部署时hexo d出现以下错误提示typeError [ERR_INVALID_ARG_TYPE]: The "mode" argument must be integer. Received an instance of Object。本文记录解决方案。

错误原因

  • hexo暂时不能在新版的nodejs环境下运行

  • 这应该是node版本过高导致的(我用的是v14.8.0),将node版本换为v12.14.0版本后,部署就成功了!

解决方法

  • 降级nodejs即可,卸载现有nodejs,安装nodejs 12

  • 如果有nvm的话,可以直接用nvm切换版本为12:

1
2
nvm install 12
nvm use 12

另外,hexo更新后或许就能支持新版nodejs了

  • 此外,我重新安装hexo之后也可以正常 hexo d了,没有降级node.js,不知道该怎么解释

参考资料



文章链接:
https://www.zywvvd.com/notes/hexo/website/17-hexo-d-error/hexo-d-error/


“觉得不错的话,给点打赏吧 ୧(๑•̀⌄•́๑)૭”

微信二维码

微信支付

支付宝二维码

支付宝支付

Hexo -17- 解决typeError [ERR_INVALID_ARG_TYPE] The "mode" argument must be integer. Received an instance of Object的问题
https://www.zywvvd.com/notes/hexo/website/17-hexo-d-error/hexo-d-error/
作者
Yiwei Zhang
发布于
2021年7月25日
许可协议