重装后重新配环境(1)-- hexo

电脑被整得开不了机了…于是重装了一下
windows10重装时可以选择保留非系统盘文件,我本来以为选择了这个之后电脑软件都可以正常重新使用,没想到效果并没有我想得那么完美,的确是很多软件文件本身还在,但是完全无法使用,于是只能辛苦地重新安装软件配环境了
我的hexo博客文件都也都还全部在,现在我想直接利用原来的内容
首先重配下环境

重新安装软件

为了使用hexo,需要重新安装nodejs、git、npm,这些软件都足够轻量,直接百度就可以啦
注意git需要重新配置一下全局的用户名和账户,我的配置命令是

git config --global user.name "HungryKonata"
git config --global user.email [email protected]

然后重新安装hexo客户端

npm install hexo-cli -g
npm install hexo --save

打开原博客(blog文件夹)
直接部署就好了

hexo clean
hexo generate
hexo deploy

注意,如果遇到这种提示:

(node:17352) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
(node:17352) Warning: Accessing non-existent property 'column' of module exports inside circular dependency
(node:17352) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency
(node:17352) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency
(node:17352) Warning: Accessing non-existent property 'column' of module exports inside circular dependency
(node:17352) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency
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:1890:10)
    at tryCatcher (E:\blog\blog\node_modules\bluebird\js\release\util.js:16:23)
    at ret (eval at makeNodePromisifiedEval (C:\Users\22926\AppData\Roaming\npm\node_modules\hexo-cli\node_modules\bluebird\js\release\promisify.js:184:12), :13:39)
    at E:\blog\blog\node_modules\hexo-fs\lib\fs.js:144:39
    at tryCatcher (E:\blog\blog\node_modules\bluebird\js\release\util.js:16:23)
    at Promise._settlePromiseFromHandler (E:\blog\blog\node_modules\bluebird\js\release\promise.js:547:31)
    at Promise._settlePromise (E:\blog\blog\node_modules\bluebird\js\release\promise.js:604:18)
    at Promise._settlePromise0 (E:\blog\blog\node_modules\bluebird\js\release\promise.js:649:10)
    at Promise._settlePromises (E:\blog\blog\node_modules\bluebird\js\release\promise.js:729:18)
    at Promise._fulfill (E:\blog\blog\node_modules\bluebird\js\release\promise.js:673:18)
    at Promise._resolveCallback (E:\blog\blog\node_modules\bluebird\js\release\promise.js:466:57)
    at Promise._settlePromiseFromHandler (E:\blog\blog\node_modules\bluebird\js\release\promise.js:559:17)
    at Promise._settlePromise (E:\blog\blog\node_modules\bluebird\js\release\promise.js:604:18)
    at Promise._settlePromise0 (E:\blog\blog\node_modules\bluebird\js\release\promise.js:649:10)
    at Promise._settlePromises (E:\blog\blog\node_modules\bluebird\js\release\promise.js:729:18)
    at Promise._fulfill (E:\blog\blog\node_modules\bluebird\js\release\promise.js:673:18)
    at Promise._resolveCallback (E:\blog\blog\node_modules\bluebird\js\release\promise.js:466:57)
    at Promise._settlePromiseFromHandler (E:\blog\blog\node_modules\bluebird\js\release\promise.js:559:17)
    at Promise._settlePromise (E:\blog\blog\node_modules\bluebird\js\release\promise.js:604:18)
    at Promise._settlePromise0 (E:\blog\blog\node_modules\bluebird\js\release\promise.js:649:10)
    at Promise._settlePromises (E:\blog\blog\node_modules\bluebird\js\release\promise.js:729:18)
    at Promise._fulfill (E:\blog\blog\node_modules\bluebird\js\release\promise.js:673:18)

重装后重新配环境(1)-- hexo_第1张图片
产生这个的原因是node的版本太高了
解决的办法很简单,卸载最新版的node14.0,重新安装稳定版的node12.14,这个问题就解决了

你可能感兴趣的:(重装后重新配环境(1)-- hexo)