AmmoMercy的技术博客

Stay hungry, stay foolish.

0%

解决hexo d The "mode" argument must be integer. 问题

在部署hexo时,出现了如下报错

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
INFO  Deploying: git
INFO Clearing .deploy_git folder...
INFO Copying files from public folder...
FATAL Something's wrong. Maybe you can find the solution here: https://hexo.io/docs/troubleshooting.html
TypeError [ERR_INVALID_ARG_TYPE]: The "mode" argument must be integer. Received an instance of Object
at copyFile (fs.js:1972:10)
at tryCatcher (D:\docs\blog\node_modules\bluebird\js\release\util.js:16:23)
at ret (eval at makeNodePromisifiedEval (D:\docs\npm_modules\node_modules\hexo-cli\node_modules\bluebird\js\release\promisify.js:184:12), <anonymous>:13:39)
at D:\docs\blog\node_modules\hexo-fs\lib\fs.js:144:39
at tryCatcher (D:\docs\blog\node_modules\bluebird\js\release\util.js:16:23)
at Promise._settlePromiseFromHandler (D:\docs\blog\node_modules\bluebird\js\release\promise.js:547:31)
at Promise._settlePromise (D:\docs\blog\node_modules\bluebird\js\release\promise.js:604:18)
at Promise._settlePromise0 (D:\docs\blog\node_modules\bluebird\js\release\promise.js:649:10)
at Promise._settlePromises (D:\docs\blog\node_modules\bluebird\js\release\promise.js:729:18)
at Promise._fulfill (D:\docs\blog\node_modules\bluebird\js\release\promise.js:673:18)
at Promise._resolveCallback (D:\docs\blog\node_modules\bluebird\js\release\promise.js:466:57)
at Promise._settlePromiseFromHandler (D:\docs\blog\node_modules\bluebird\js\release\promise.js:559:17)
at Promise._settlePromise (D:\docs\blog\node_modules\bluebird\js\release\promise.js:604:18)
at Promise._settlePromise0 (D:\docs\blog\node_modules\bluebird\js\release\promise.js:649:10)
at Promise._settlePromises (D:\docs\blog\node_modules\bluebird\js\release\promise.js:729:18)
at Promise._fulfill (D:\docs\blog\node_modules\bluebird\js\release\promise.js:673:18)
at Promise._resolveCallback (D:\docs\blog\node_modules\bluebird\js\release\promise.js:466:57)
at Promise._settlePromiseFromHandler (D:\docs\blog\node_modules\bluebird\js\release\promise.js:559:17)
at Promise._settlePromise (D:\docs\blog\node_modules\bluebird\js\release\promise.js:604:18)
at Promise._settlePromise0 (D:\docs\blog\node_modules\bluebird\js\release\promise.js:649:10)
at Promise._settlePromises (D:\docs\blog\node_modules\bluebird\js\release\promise.js:729:18)
at Promise._fulfill (D:\docs\blog\node_modules\bluebird\js\release\promise.js:673:18)

查询资料可知 是由于node.js@14+与hexo不兼容导致的(该bug 在2020年五月就已出现 截至2021.03仍未修复 李在赣神魔hexo)

遂降级node

点击node realease查看所有版本 我选择下载13.14

下载后直接解压至node所在目录 全部替换即可

水文完毕(逃