ATURICS

Viva la Vida


  • Home

  • About

  • Tags

  • Categories

  • Archives

  • Search

hexo一路坑

Posted on 2019-08-15 Edited on 2019-08-20

$Prologue$

2019.8.18,我的博客正式搭建完成(基础功能和我喜欢的美化基本上都有了。)

中间出过的锅也不少,但结局也还算圆满。

将一路踩过的坑,记述于此。

$Recommend$

$hexo$史上最全搭建教程-$zjufangzh$

$hexo$博客搭建指北-$ouuan$

$1.nodejs:\;command\;not\;found$

调了一下环境变量。

用户变量Path改为

D:\Program Files\nodejs\node_global\

或者C:\Users\dguser\Desktop\你的博客文件夹\node_modules.bin

或许两个都要

$2.hexo\;sth$

一输入和hexo有关的命令就会输出这个

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
C:\Users\dguser\Desktop\myBlog\ATURICS.github.io\node_modules\nanomatch\index.js:243 nanomatch.every = ftn tion(list,peUdgrns$ Ottioos  {
^

SyntaxError: Invalid or unexpected token
at Module._compile (internal/modules/cjs/loader.js:723:23)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object. (C:\Users\dguser\Desktop\myBlog\ATURICS.github.io\node_modules\micromatch\lib\compilers.js:3:17)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object. (C:\Users\dguser\Desktop\myBlog\ATURICS.github.io\node_modules\micromatch\index.js:16:17)`

$AskLink1$

$CSDN$

这些建议中的一个或多个解决了我的问题,在此衷心感谢。

$3.hexo\;d$

$AskLink2$

每次执行hexo d

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
INFO  Deploying: git
INFO Clearing .deploy_git folder...
INFO Copying files from public folder...
INFO Copying files from extend dirs...
warning: LF will be replaced by CRLF in 2019/08/06/模拟退火(SA)学习笔记/index.html.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in 2019/08/07/Hexo-NexT主题搭建笔记/index.html.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in 2019/08/07/洛谷P3177 [HAOI2015]树上染色/index.html.
The file will have its original line endings in your working directory
error: inflate: data stream error (invalid distance too far back)
error: corrupt loose object '5ec2e21b772abf9d4ee09bd363ad7f1f5ae4b035'
fatal: loose object 5ec2e21b772abf9d4ee09bd363ad7f1f5ae4b035 (stored in .git/objects/5e/c2e21b772abf9d4ee09bd363ad7f1f5ae4b035) is corrupt
FATAL Something's wrong. Maybe you can find the solution here: https://hexo.io/docs/troubleshooting.html
Error: Spawn failed
at ChildProcess.<anonymous> (C:\Users\dguser\Desktop\myBlog\ATURICS.github.io\node_modules\hexo-util\lib\spawn.js:52:19)
at ChildProcess.emit (events.js:198:13)
at ChildProcess.cp.emit (C:\Users\dguser\Desktop\myBlog\ATURICS.github.io\node_modules\cross-spawn\lib\enoent.js:40:29)
at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)

感谢code004大佬的耐心指导。

$4.Gitalk\;Error:Not\;Found$

在上面的提问链接2中code004大佬也帮助解决了这个问题。

我的锅和别人不太一样

Gitalk那些要求你填的用户名都是上面那个加粗的。

我原来上面那个名字是八声甘州,后来改了就好了……反正把两个改成一样的保险。

$5.$图片无法显示

网上的教程基本是没问题的

只是要你下的那个破烂插件不能用1.0.0版的

有人说的0.0.1,在next用就会让每篇博文的摘要只显示二十来个字,非常丑。

所以您install的时候别直接打hexo-asset-image

要写https://github.com/CodeFalling/hexo-asset-image.git

这样下的是0.0.5,可以正常显示图片。

$6.404$

$AskLink3$

code004大佬再一次粗线…….

当时一激动,把repo直接删掉了。

后来deploy就一直有问题,触目惊心的红字伤透我的心。

只好重新init一个文件夹,把三样东西CtrlV过去。

1.主文件夹下的source

2.主文件夹下的config.yml

3.你选的那个主题整个儿搬过去就可以辣

$7.$乱码

如果你为了装逼用了$English$

将记事本-文件(F)-另存为(A)-编码(E)改为$UTF-8$

中文即可正常显示。

$PostScript$

我真的弄了很久,中间也有很崩溃很情绪化。

如果你对从未接触过的奇怪代码感到绝望,也请你不要放弃。

欢迎你来问我,在我的能力范围内,我乐意解答。

感谢code004大佬的帮助。

「题解」 [HAOI2015]树上染色
一些好用的软件/网址推荐!
  • Table of Contents
  • Overview
八聲甘州

八聲甘州

射虎山横一骑,裂石响惊弦。
9 posts
2 categories
4 tags
GitHub Luogu LibreOJ Zhihu
Friend Links
  • tgs9311
  • zymredbird
  • STEE_HZY
  • code004
  1. 1. $Prologue$
  2. 2. $Recommend$
  3. 3. $1.nodejs:\;command\;not\;found$
  4. 4. $2.hexo\;sth$
  5. 5. $3.hexo\;d$
  6. 6. $4.Gitalk\;Error:Not\;Found$
  7. 7. $5.$图片无法显示
  8. 8. $6.404$
  9. 9. $7.$乱码
  10. 10. $PostScript$
© 2019 八聲甘州
Powered by Hexo v3.9.0
|
Theme – NexT.Gemini v7.3.0