blogdown problem with Hugo update

I previous used Hugo 0.38.2 with R 3.4.0 to build my website. Everything worked fine until I accidentally updated to Hugo 0.55.6 in R 3.6.0 and updated several packages. So I downgraded my Hugo version to 0.38.2 and ran into the following error while trying to build the same website (exactly the same project) in R 3.4.0. My Rstudio version is 1.2.1335.

I guess the problem might be the update of several packages. Does anyone know what the following error message mean? Thanks a lot!

==> rmarkdown::render_site(encoding = 'UTF-8')

Error in get(name, envir = asNamespace(pkg), inherits = FALSE) :
object 'sans_ext' not found
Calls: ... build_site -> build_rmds -> by_products -> ::: -> get
Execution halted

Exited with status 1.

Hi @blazingarrow - maybe checkout:


From these - my guess in that the function knitr:::sans_ext is no longer available. Maybe run sessionInfo() in the console to find out what version on knitr you have. My guess is your version no longer has it. Not sure what the best fix is at this point... you could revert back to an older version of knitr or get the xfun package as the post suggests and then see if you can build your site. The knitr version I currently have is 1.20 and it still has the sans_ext function.

Hi there,

To be clear, you show yourself using rmarkdown::render_site() on a blogdown site? With a blogdown site, you cannot use that function. You'll need to use the serve site function, described in the book:

@jrlewi Thank you so much for pointing me to this direction! The function 'sans_ext' was indeed removed from the 'knitr' package. I downgraded both 'knitr' and 'rmarkdown' packages, and it worked!

I have one error message but it does not seem to affect the website. The error message is:

Error in as.vector(x, "character") :
cannot coerce type 'environment' to vector of type 'character'

I tried old version of 'xfun' but it didn't solve the above problem. I cannot use old versions of 'later' and 'httpuv' because serve_site seems to force me to use the latest 'httpuv' and 'later' packages.

Your advice saved me lots of time.

Hi Alison,
Use serve site function gave the following error message:

Error in get(name, envir = asNamespace(pkg), inherits = FALSE) :
object 'loadable' not found

I downgraded the knitr and rmarkdown packages to make it work.

BTW, most of my knowledge about blogdown and netlify comes from your blog post. Thank you for sharing the knowledge!

1 Like

I also replaced Rstudio with an old version 1.1.463. The error message about "as.vector()" is gone. Looks like everything is fixed.:smile:

1 Like

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