普拉多VX

人生一路,不问来时,不知归期

0%

node14+ 版本下hexo部署失败报错

问题

因博客迁移换了电脑,升级了node 升级版本为14.4.0。然后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
ATAL 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:1895:10)
at tryCatcher (/Users/luodi/githubblog/node_modules/bluebird/js/release/util.js:16:23)
at ret (eval at makeNodePromisifiedEval (/usr/local/lib/node_modules/hexo-cli/node_modules/bluebird/js/release/promisify.js:184:12), <anonymous>:13:39)
at /Users/luodi/githubblog/node_modules/hexo-fs/lib/fs.js:144:39
at tryCatcher (/Users/luodi/githubblog/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/Users/luodi/githubblog/node_modules/bluebird/js/release/promise.js:547:31)
at Promise._settlePromise (/Users/luodi/githubblog/node_modules/bluebird/js/release/promise.js:604:18)
at Promise._settlePromise0 (/Users/luodi/githubblog/node_modules/bluebird/js/release/promise.js:649:10)
at Promise._settlePromises (/Users/luodi/githubblog/node_modules/bluebird/js/release/promise.js:729:18)
at Promise._fulfill (/Users/luodi/githubblog/node_modules/bluebird/js/release/promise.js:673:18)
at Promise._resolveCallback (/Users/luodi/githubblog/node_modules/bluebird/js/release/promise.js:466:57)
at Promise._settlePromiseFromHandler (/Users/luodi/githubblog/node_modules/bluebird/js/release/promise.js:559:17)
at Promise._settlePromise (/Users/luodi/githubblog/node_modules/bluebird/js/release/promise.js:604:18)
at Promise._settlePromise0 (/Users/luodi/githubblog/node_modules/bluebird/js/release/promise.js:649:10)
at Promise._settlePromises (/Users/luodi/githubblog/node_modules/bluebird/js/release/promise.js:729:18)
at Promise._fulfill (/Users/luodi/githubblog/node_modules/bluebird/js/release/promise.js:673:18)
at Promise._resolveCallback (/Users/luodi/githubblog/node_modules/bluebird/js/release/promise.js:466:57)
at Promise._settlePromiseFromHandler (/Users/luodi/githubblog/node_modules/bluebird/js/release/promise.js:559:17)
at Promise._settlePromise (/Users/luodi/githubblog/node_modules/bluebird/js/release/promise.js:604:18)
at Promise._settlePromise0 (/Users/luodi/githubblog/node_modules/bluebird/js/release/promise.js:649:10)
at Promise._settlePromises (/Users/luodi/githubblog/node_modules/bluebird/js/release/promise.js:729:18)
at Promise._fulfill (/Users/luodi/githubblog/node_modules/bluebird/js/release/promise.js:673:18)

解决方法

下载最新稳定版本12.18.1 https://nodejs.org/en/download/

下载安装完成后重新执行部署

1
2
3
hexo clean
hexo g
hexo d

参考文档: