Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/78.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
R blogdown new_site()引发错误_R_Blogdown - Fatal编程技术网

R blogdown new_site()引发错误

R blogdown new_site()引发错误,r,blogdown,R,Blogdown,如果我尝试运行blogdown::new_site()我会收到一条错误消息,我怀疑这可能是由于linux/windows的斜杠转换问题 blogdown::new_site() Congratulations! Your new Hugo site is created in D:\Documents\Blog. Just a few more steps and you're ready to go: 1. Download a theme into the same-named fold

如果我尝试运行
blogdown::new_site()
我会收到一条错误消息,我怀疑这可能是由于linux/windows的斜杠转换问题

blogdown::new_site()
Congratulations! Your new Hugo site is created in D:\Documents\Blog.

Just a few more steps and you're ready to go:

1. Download a theme into the same-named folder.
   Choose a theme from https://themes.gohugo.io/, or
   create your own with the "hugo new theme <THEMENAME>" command.
2. Perhaps you want to add some content. You can add single files
   with "hugo new <SECTIONNAME>\<FILENAME>.<FORMAT>".
3. Start the built-in live server via "hugo server".

Visit https://gohugo.io/ for quickstart guide and full documentation.
trying URL 'https://github.com/yihui/hugo-lithium-theme/archive/master.zip'
Content length 119078 bytes (116 KB)
downloaded 116 KB

Error in gsub(tmpdir, ".", zipdir) : 
  invalid regular expression '.\3aec55bc496d', reason 'Invalid back reference'

正如我在评论中提到的,这确实是blogdown中的一个bug,它可以追溯到Windows和Unix在处理路径名中斜杠的方式上的差异(或者更具体地说,在Windows上处理输出中斜杠的方式上的差异)


这个问题现在应该从blogdown的0.5.10版开始修复,您可以使用
devtools::install\u github(“rstudio/blogdown”)

Hi@mhwh安装它,感谢您的问题报告。在将来,请随时报告此类问题。我已经提交了。同时,您可以通过运行
devtools::install_github(“rstudio”),使用CRAN版本的blogdown或引入bug的更改之前的版本/blogdown@051efcacf)
sessionInfo()
R version 3.4.3 (2017-11-30)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

locale:
[1] LC_COLLATE=English_United Kingdom.1252  LC_CTYPE=English_United Kingdom.1252   
[3] LC_MONETARY=English_United Kingdom.1252 LC_NUMERIC=C                           
[5] LC_TIME=English_United Kingdom.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] blogdown_0.5.9

loaded via a namespace (and not attached):
[1] compiler_3.4.3 bookdown_0.7   tools_3.4.3    yaml_2.1.18    knitr_1.20     xfun_0.1