blogdown serve_site(), Hugo execution failed with error code 1

I think that serve_site {blogdown} documentation suggests the folder is non-configurable. The signature is serve_site(...)

... Arguments passed to servr::httw() (arguments dir, site.dir, baseurl, and handler have been provided, hence you cannot customize these arguments).

I'd suggest confirming this by opening an issue at the github page and soliciting suggestions there if no one here comes to the rescue.

1 Like

@hcp4715 do you manage to build your website ? using blogdown::build_site(local = TRUE) ?

This is what serve_site is using.

I suspect the issue is not with serving the site but rather building it .


Hi, @cderv,

Thanks, just tried, the same error.

1 Like

That's really weird then, because there are folders.

That looks like a path error. Confirm their existence in the terminal?

Hi, @technocrat,
What did you mean by "their existence in the terminal"?
the current working directory is My_sites/myBlog/


1 Like

Sorry to be obscure.

From the terminal

 $ 516:  cat /Users/rc/projects/locus/content/post/index.html
site: blogdown:::blogdown_site
1 Like

Hi, @technocrat,

Sorry I not sure I understand.

Did you mean that I should click the terminal window of R studio, and input cat /Users/rc/projects/locus/content/post/index.html? And then run serve_site().

That's what I've just done (changed the path of index.html to mine), but it didn't change anything.

Forgive my inexperience. When using R, I only used Console of Rstudio (and also I run blogdown on a windows system).

Would you just give a bit more instructions? e.g., which terminal I should use, or with file I should edit?

thanks a lot!

Sorry to be obscure again, and Unix-centric to boot.

The goal is to confirm the existence and location of the file identified in the error message. cat is just one tool to do that. However you do it in Windows normally will work just as well.

1 Like

Hi, thanks.
I run the code (see below), but the problem persists.

OK, I'm now officially stumped. @cderv ?

This seems like a path issue. You have ... before index.html in your error. The path you test for existence is not the same.

It is not easy for us without seeing the all website. Can you share your source code in a GH repo or similar?

I would check all the conf in your config file. Also you can try to use hugo at the command line to see if it is R which is meddling with the path.

I really don't know why this dots are added. That must be a hugo behavior that I am currently missing.

1 Like

Hi, @cderv

Thanks a lot, which part of the site should I upload? The whole folder that including all files (which includes config, content, 'public', and other subfolders), or just the folder public?

I think this is the source folder which is interesting as you can"t build it currently

I see.
Here is the github repo:
I think I uploaded all the files in my folder.
Thanks for taking your time.

Just a wild guess: maybe some issues with authors folder that contains some dots like


maybe hugo can't access those folder with a . in the name

Does that mean, all names in the authors' folder should avoid . ?
But Actually I didn't create these folders, these were automatically added when I added information of papers.

It is just a guess. You can try modifying authors name and see if it changes anything. Less error messages for example ?

I would also try to use hugo command directly - I think the issue comes from HUGO and not blogdown. Did you upgrade Hugo recently ?

I deleted all subfolders, only leave the admin, and the same error.

my hugo version is 0.59.1.

I also think it's more likely to be a problem of Hugo. How to try use hugo command directly? :cold_sweat:

The subfolders are created by your theme based on authors in posts. You can disable this feature to see if that is what is causing pain here

As you see in the link above , if you have the correct version you can disable with config otherwise you need to modify template.

About Hugo it is installed in your computer and you can use the command in terminal. Look at hugo doc. There is a wrapper available with ˋhugo_cmd()ˋ in R.