hexo deploy TypeError [ERR_INVALID_ARG_TYPE]
When deploy to GitHub pages, got the follow error1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17INFO ==================================
███╗ ██╗███████╗██╗ ██╗████████╗
████╗ ██║██╔════╝╚██╗██╔╝╚══██╔══╝
██╔██╗ ██║█████╗ ╚███╔╝ ██║
██║╚██╗██║██╔══╝ ██╔██╗ ██║
██║ ╚████║███████╗██╔╝ ██╗ ██║
╚═╝ ╚═══╝╚══════╝╚═╝ ╚═╝ ╚═╝
========================================
NexT version 8.8.1
Documentation: https://theme-next.js.org
========================================
INFO Deploying: git
INFO Clearing .deploy_git folder...
INFO Copying files from public folder...
FATAL {
err: TypeError [ERR_INVALID_ARG_TYPE]: The "mode" argument must be integer. Received an instance of Object
at copyFile (node:fs:2774:10)
Found the root cause is node version is too high. downgraded to node12 will solve the issue.
1 | hexo -v 2 ↵ 2791 23:55:19 |
Run the following commands to downgrade node for MacOS1
2
3
4
5
6
7
8
9
10
11brew search node
==> Formulae
libbitcoin-node llnode node-build node@10 node@14 node_exporter nodeenv ode
linode-cli node ✔ node-sass node@12 node@16 ✔ nodebrew nodenv
brew unlink node
brew install node@12
sudo brew link --overwrite node@12
or
echo 'export PATH="/usr/local/opt/node@12/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc