简体   繁体   中英

Can't understand the error message from blogdown

I am trying to make a blog with blogdown using my windows machine, but get this error message when I use RStudio (File/New Project/New Directory/Website using blogdown/... and enter Directory name: "new"):

 setwd("C:/Users/AndrésLagerlöf/OneDrive - Andrés Lagerlöf Konsulttjänst AB/R/blog")
'C:\Users\Andr‚sLagerl”f\AppData\Roaming\Hugo\hugo.exe" new site "new' is not recognized as an internal or external command,
operable program or batch file.
Error in shell(cmd, mustWork = TRUE, intern = intern) : 
  '"C:\Users\AndrésLagerlöf\AppData\Roaming\Hugo\hugo.exe" new site "new" --force -f toml' execution failed with error code 1

I do not know what to make out of this error message. Does anyone know how to fix this?

I use R version 4.0.0 and RStudio Version 1.2.5033.

Kind regards, Andrés

You may consider installing Hugo to a path that does not contain multibyte characters. Per documentation ?blogdown::install_hugo :

If you want to install Hugo to a custom path, you can set the global option blogdown.hugo.dir to a directory to store the Hugo executable before you call install_hugo() , eg, options(blogdown.hugo.dir = '~/Downloads/hugo_0.20.1/') .

This is also mentioned in Appendix D.1 in the blogdown book. You'd better set this option in your .Rprofile (see Section 1.4 for how), so the setting won't be lost after you restart R.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM