博客搬家

5.1晚发现博客大多数图片挂了,然后发现用gitee创的图床,大多数图片被禁了,后面在官方群内看到是图床有的图片浪费公共空间,所以被官方毙了。。。索性用sm.ms+picgo作为新的图床。

5.2早更新博客,发现gitee要整改,这下只能被迫搬家,由于github被墙了,所以我才选的gitee部署,这下只能继续找其他的服务器托管,结果找了半天,发现不是腾讯云、阿里云,就是被他们的(coding),其他的也是收费或者有限制条件的。最后转了一大圈还是回来用github部署,然后在网上找了下,发现有第三方代理vercel(前身zeit.co)。用完后发现github+vercel简直无敌,白嫖能力upup。

博客报错

今天搬家前,突然发现hexo s和hexo g -d报错:

1
2
3
4
5
6
7
(node:10076) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
(node:10076) Warning: Accessing non-existent property 'column' of module exports inside circular dependency
(node:10076) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency
(node:10076) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency
(node:10076) Warning: Accessing non-existent property 'column' of module exports inside circular dependency
(node:10076) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency

在网上简单查了下,这是由于node版本过高导致的,明明部署了一个月都没问题,咋突然犯病了???然后网上的办法基本都是复制粘贴,一是说是要删node文件夹+,然后下载nvm来使用老版本。二是说用sudo npm install n -p来使用插件恢复老版本,结果折腾半天发现windows系统用不了n模块。。。随后看到一个博客提了一嘴gnvm,马上去搜一下,发现能搞。

1、GitHub上搜索gnvm,点击第一个搜索项

blog.jpg

2、进入项目后,在下面的下载区域进行对应下载。

3、将下载好的gnvm.exe 放在node.exe的路径下。

4、在博客文件夹打开cmd,输入gnvm install 12.14.0(这里选择比较稳定版本)

5、输入gnvm use 12.14.0,即可切换成老版本,而且还可使用use命令切回新版本,使用gnvm不用删node,还是相当舒服的。(官方文档内还有其他的功能语句,可以自行查看)

6、最后我们在回去部署博客,发现已经没有报错了。

Github+vercel

这两个组合其实网上还是很多的,就不细说了,建议使用github的小伙伴们都去用vercel中转,这样国内一般访问更轻松。(其实我主要是想让同学或者路人能看见博客,github不挂梯子咋看啊!!)