Issues when running blogdown::serve_site()

Hi, all, after using blogdown for a long period, I seem to have done something quite wrong. When rendering the site, the following errors (and warnings & messages) appear:

> blogdown::serve_site()
Error in if (file == "") stop("'file' must be non-empty string") : 
  missing value where TRUE/FALSE needed
Calls: <Anonymous> -> create_token_ -> saveRDS
Execution halted
Error in run_script("R/build.R", as.character(local)) : 
  Failed to run R/build.R
Building sites … WARN 2019/07/24 12:41:28 Page's .URL is deprecated and will be removed in a future release. Use .Permalink or .RelPermalink. If what you want is the front matter URL value, use .Params.url.

                   | EN   
+------------------+-----+
  Pages            | 168  
  Paginator pages  |  15  
  Non-page files   |  21  
  Static files     | 177  
  Processed images |   0  
  Aliases          |  46  
  Sitemaps         |   1  
  Cleaned          |   0  

Total in 806 ms

I've tried to debug but have not gotten far. Oddly, I was able to render the site successfully as recently as one or two changes ago. Is there anything obvious that may be causing these issues? The repository for the site is here: https://github.com/jrosen48/utk-homepage

I caution anyone from cloning and rendering the repository, only because there are a number of posts that may take awhile to render (and may, by now, have some issues with dependencies).

1 Like

I was able to run serve_site() for your blogdown site on my local machine running Ubuntu 18.04:

> blogdown::serve_site()
Started building sites ...
Built site for language en:
0 draft content
0 future content
0 expired content
71 regular pages created
96 other pages created
21 non-page files copied
61 paginator pages created
7 categories created
36 tags created
total in 368 ms
To stop the server, run servr::daemon_stop(1) or restart your R session
Serving the directory /home/jdb-work/repos/utk-homepage at http://127.0.0.1:4321
> packageVersion("blogdown")
[1] ‘0.14’
> blogdown::hugo_version()
[1] ‘0.20.2’

What version of Hugo do you have installed? Based on this Hugo post, the warning you are receiving is due to the references to .URL in both of your themes (xmin and lithium). I'm not sure if this is related to what is causing the error, but some things to try would be 1) installing an older version of Hugo, or 2) install updated versions of the themes (e.g. the xmin theme was updated to fix this warning as of this commit from April.

3 Likes

Oye, this seemed to be due to a function in my .rprofile causing an error! regarding the .URL references, I will Hugo and my theme. Thank you!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.