yihui
问题 1 我不懂。
原来截图里那个问题我也复现不出来了,但我又一通乱试有了一些新的收获。
1.我先把hugo版本从0.79.0改到0.81.0,然后又又又新建文件夹下载"CaiJimmy/hugo-theme-stack"这个主题,再blogdown::serve_site()又失败了,报错的内容还是超时及提示content\post\rich-content\index.md这个文件有问题,可以通过删掉这个文件解决。
2.再把blogdown包从1.1.13版本卸载重装1.1版本,情况和上面一样。
3.再再把rmarkdown包从2.7版本卸载重装2.3版本,报了新的错误,和原来 问题1 截图里面的报错似乎差异很大。但是有了前面的经验,仔细看了错误中提到的https://api.twitter.com和https://vimeo.com我都访不了,看来还是墙的原因。
哈哈,新的收获有二,一是如果报的错是直接定位到文件的,那对新手真是很友好的,不然只提示我某某网址导致超时那确实一头雾水;二是,blogdown::serve_site()的报错内容好像有点“玄学”,虽然"CaiJimmy/hugo-theme-stack"这个主题总是报错,根本原因也都是因为文件中有网址访不了,但报错的具体内容出现了好几种。
可想而知,一个好包,除了功能好用重要,关键时刻报出来“正确的错误”也很重要啊。
CyrusYip
谢谢你的建议。
另外,"CaiJimmy/hugo-theme-stack"这个主题我每次试都会碰到因为有网址被墙了而报错的情况,但你竟然一次成功了,难道墙本身可能并不是完全密不透风么。
为了不使我的文字太散乱,我把这三次瞎碰乱试的报错信息等一起放下面了。
-----------1把hugo版本从0.79.0改到0.81.0---------------------------
blogdown:::serve_site()
Launching the server via the command:
C:/Users/fanfan/AppData/Roaming/Hugo/0.81.0/hugo.exe server --bind 127.0.0.1 -p 4321 --themesDir themes -t hugo-theme-stack -D -F --navigateToChanged
Error: Error building site: "D:\R\yiyiblog\test6\content\post\rich-content\index.md:1:1": timed out initializing value. You may have a circular loop in a shortcode, or your site may have resources that take longer to build than the timeout
limit in your Hugo config file.
sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
Matrix products: default
locale:
[1] LC_COLLATE=Chinese (Simplified)China.936 LC_CTYPE=Chinese (Simplified)China.936
[3] LC_MONETARY=Chinese (Simplified)China.936 LC_NUMERIC=C
[5] LC_TIME=Chinese (Simplified)China.936
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] Rcpp_1.0.6 bookdown_0.21 ps_1.5.0 digest_0.6.27 later_1.1.0.1
[6] R6_2.5.0 jsonlite_1.7.2 magrittr_2.0.1 evaluate_0.14 blogdown_1.1.13
[11] rlang_0.4.10 rstudioapi_0.13 promises_1.2.0.1 rmarkdown_2.7 tools_4.0.0
[16] servr_0.21 processx_3.4.5 httpuv_1.5.5 xfun_0.21 yaml_2.2.1
[21] compiler_4.0.0 htmltools_0.5.1.1 knitr_1.31 Matrix products: default
-----------2再把blogdown包从1.1.13版本卸载重装1.1版本--------------------------------
blogdown:::serve_site()
Launching the server via the command:
C:/Users/fanfan/AppData/Roaming/Hugo/0.81.0/hugo.exe server --bind 127.0.0.1 -p 4321 --themesDir themes -t hugo-theme-stack -D -F --navigateToChanged
Error: Error building site: "D:\R\yiyiblog\test6\content\post\rich-content\index.md:1:1": timed out initializing value. You may have a circular loop in a shortcode, or your site may have resources that take longer to build than the timeout
limit in your Hugo config file.
sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
Matrix products:
default
locale:
[1] LC_COLLATE=Chinese (Simplified)China.936 LC_CTYPE=Chinese (Simplified)China.936
[3] LC_MONETARY=Chinese (Simplified)China.936 LC_NUMERIC=C
[5] LC_TIME=Chinese (Simplified)China.936
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] Rcpp_1.0.6 bookdown_0.21 ps_1.5.0 digest_0.6.27 later_1.1.0.1
[6] R6_2.5.0 jsonlite_1.7.2 magrittr_2.0.1 evaluate_0.14 blogdown_1.1
[11] rlang_0.4.10 rstudioapi_0.13 promises_1.2.0.1 rmarkdown_2.7 tools_4.0.0
[16] servr_0.21 processx_3.4.5 httpuv_1.5.5 xfun_0.21 yaml_2.2.1
[21] compiler_4.0.0 htmltools_0.5.1.1 knitr_1.31
------------3再再把rmarkdown包从2.7版本卸载重装2.3版本------------------------------------------------
blogdown:::serve_site()
Launching the server via the command:
C:/Users/fanfan/AppData/Roaming/Hugo/0.81.0/hugo.exe server --bind 127.0.0.1 -p 4321 --themesDir themes -t hugo-theme-stack -D -F --navigateToChanged
Error: Error building site: logged 2 error(s)
blogdown::build_site()
Start building sites 鈥?
ERROR 2021/02/21 14:51:00 Failed to get JSON resource "https://api.twitter.com/1/statuses/oembed.json?id=1085870671291310081&omit_script=true": Get "https://api.twitter.com/1/statuses/oembed.json?id=1085870671291310081&omit_script=true": read tcp 192.168.1.4:60752->104.244.43.182:443: wsarecv: An existing connection was forcibly closed by the remote host.
If you feel that this should not be logged as an ERROR, you can ignore it by adding this to your site config:
ignoreErrors = ["error-remote-getjson"]
ERROR 2021/02/21 14:51:01 Failed to get JSON resource "https://vimeo.com/api/oembed.json?url=https://vimeo.com/48912912": Get "https://vimeo.com/api/oembed.json?url=https://vimeo.com/48912912": read tcp 192.168.1.4:60756->128.242.240.155:443: wsarecv: An existing connection was forcibly closed by the remote host.
If you feel that this should not be logged as an ERROR, you can ignore it by adding this to your site config:
ignoreErrors = ["error-remote-getjson"]
Total in 6429 ms
Error: Error building site: logged 2 error(s)
sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
Matrix products: default
locale:
[1] LC_COLLATE=Chinese (Simplified)China.936 LC_CTYPE=Chinese (Simplified)China.936
[3] LC_MONETARY=Chinese (Simplified)China.936 LC_NUMERIC=C
[5] LC_TIME=Chinese (Simplified)China.936
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] Rcpp_1.0.6 bookdown_0.21 ps_1.5.0 digest_0.6.27 later_1.1.0.1
[6] R6_2.5.0 jsonlite_1.7.2 magrittr_2.0.1 evaluate_0.14 blogdown_1.1
[11] rlang_0.4.10 rstudioapi_0.13 promises_1.2.0.1 rmarkdown_2.3 tools_4.0.0
[16] servr_0.21 processx_3.4.5 httpuv_1.5.5 xfun_0.21 yaml_2.2.1
[21] compiler_4.0.0 htmltools_0.5.1.1 knitr_1.31