Blogdown::serve_site() file not found error


I am new to blogdown, Hugo and the I hope that this site is right place to raise this topic.

This is the situation: I have successfully used R Markdown and established a HTML that demonstrates my R package's ability, which I call 'CF', to visualize my simulation with 'animation', 'ggplot' and 'gganimation' tools. I want to add 'shiny' tools to improve my 'CF' package. It seems doable with 'blogdown' and Hugo. I am uncertain that the following is useful, but I will offer it anyway: It works!

I used yihui's procedure to establish a 'blogdown' site. When I tried to change the Hugo theme from 'lithium' to 'academic,' I ran into trouble. Hugo suggested that I establish a new R project. I did and I call it, 'academic-kickstart.'

Note, the use of the term: 'CF.' It is the name of one of my R packages. The file '' appears nowhere in my two packages. After searching the web, I found some suggestions on how to address the problem that are similar to my issue. They don't fix the problem.


Rendering content/post/2018-02-10-academic-kickstart.Rmd
Error: object 'CF.mb' not found
Execution halted
Error in render_page(f) :
Failed to render 'content/post/2018-02-10-academic-kickstart.Rmd'

I tried to offer other information but I received a message that I cannot include 10 users in a message. I don't understand the message.


Could you include a brief explanation of what suggested solutions you tried that did not work? This would save people from re-suggesting them here. Also, worth noting that the object is CF.mb not (which would suggest it was looking for a markdown file). I'm not familiar with the filetype, which, from what I've been able to find, is either: a binary scene file for AutoDesk Maya, or memo field values for a Paradox database.

It's also helpful to abstract the problem out a bit. Basically, you are calling for something in the post that isn't there. Once you figure out what that something is (is it possible there's a typo somewhere?), there are several threads here, and elsewhere that can help you get that sorted.

(@raybuhr has a helpful post referenced in that last thread that might be helpful).

1 Like

Hi Mara,

I scoured the web to find an answer to my problems without any luck. This is my attempt to fix the problem:

  1. I uninstalled 'blogdown' and reinstalled it and got the same error. Conclusion. It is not exclusively a blogdown issue,

  2. Yihui has requested information from users.

[1] "/Users/PJO/Desktop/academic-kickstart"

list.files('content', '.md$', full.names = TRUE, recursive = TRUE)
[1] "content/home/" "content/home/"
[3] "content/home/" "content/home/"
[5] "content/home/" "content/home/"
[7] "content/home/" "content/home/"
[9] "content/home/" "content/post/"
[11] "content/post/2018-02-10-academic-kickstart.Rmd" "content/publication/"
[13] "content/talk/"

  1. Yihui suggested the following:
    file does not exist · Issue #63 · rstudio/blogdown · GitHub

R_nvim_wd = -1
Rendering content/post/2018-02-10-academic-kickstart.Rmd
Error: object 'CF.mb' not found
Execution halted
Error in render_page(f) :
Failed to render 'content/post/2018-02-10-academic-kickstart.Rmd'

  1. Searched. The file does not exist on my computer.
    PJO:~ PJO$ find ~ -name ""
    PJO:~ PJO$ find ~ -name "academic-kickstart.Rmd"

yihui added a commit that referenced this issue on Aug 5, 2017
fix #63: make sure the working directory is preserved when calling Rs… …

the Nvim-R plugin can mess up the working directoy, which sounds really bad...

Session info ----------------------------------------------------------------------------------------
setting value
version R version 3.4.2 (2017-09-28)
system x86_64, darwin15.6.0
ui RStudio (1.1.383)
language (EN)
collate en_US.UTF-8
tz America/New_York
date 2018-02-11

Packages --------------------------------------------------------------------------------------------
package * version date source
ansistrings 2018-01-31 Github (r-lib/ansistrings@f27619b)
assertthat 0.2.0 2017-04-11 cran (@0.2.0)

  1. Blogdown serve-site() aborting R session - #18 by pssguy

if (!require("devtools")) install.packages("devtools")
Loading required package: devtools
ERROR: compilation failed for package ‘httpuv’

  • removing ‘/Users/PJO/Library/R/3.4/library/httpuv’
    Installation failed: Command failed (1)

Hi Mara,

Thanks to you, I looked for the 'CF.mb' file. It does not exist. To be honest, I have no idea where it came from. Typo?

Nonetheless, neither the 'CF.mb' nor '' files exist. Regardless, I made some discoveries, one good; one bad.

  1. GOOD. I added 'CF.mb', an empty file, to my 'CF' package. The following animation works again as well as other functions. Example:

Warning: Ignoring unknown aesthetics: frame
convert -loop 0 -delay 100 Rplot1.png Rplot2.png Rplot3.png Rplot4.png Rplot5.png
Rplot6.png Rplot7.png Rplot8.png Rplot9.png Rplot10.png Rplot11.png Rplot12.png
Rplot13.png Rplot14.png Rplot15.png Rplot16.png Rplot17.png Rplot18.png Rplot19.png
Rplot20.png Rplot21.png Rplot22.png Rplot23.png Rplot24.png Rplot25.png Rplot26.png
Rplot27.png Rplot28.png Rplot29.png Rplot30.png 'file1782f6fa9a091.gif'
Output at: file1782f6fa9a091.gif

  1. BAD. knit does not work.
    Error: object 'CF.mb' not found
    Execution halted

  2. I get the following errors and warnings from
    ==> devtools::check(cleanup = FALSE)

  • checking top-level files ... NOTE
    Non-standard files/directories found at top level:
    ‘CF.mb’ ‘TZ.txt’ ‘render_blogdown.txt’
  • checking R code for possible problems ... NOTE
    cfanim: no visible global function definition for ‘ggplot’
    cfanim: no visible global function definition for ‘geom_point’, ...
    Undefined global functions or variables:
    aes geom_line geom_point gganimate ggplot theme_bw theme_set x
    cfanim(60, 3, 30, 0.25)
    Error in ggplot(df, xlim = xlim, ylim = ylim, col = gray(0.5)) :
    could not find function "ggplot".
    Calls: cfanim
    Execution halted
    ggplot is part of the 'ggplot2' package and it is in the session:
    ggplot2 * 2.2.1 2016-12-30 CRAN (R 3.4.0)
    Second, 'ggplot' is not a package.
    Status: 1 ERROR, 2 NOTEs
    checking examples ... ERROR
    Running examples in ‘CF-Ex.R’ failed
    The error most likely occurred in:

base::assign(".ptime", proc.time(), pos = "CheckExEnv")

Name: cfanim

cfanim(60, 3, 30, 0.25) works despite the check errors.
Warning: Ignoring unknown aesthetics: frame
convert -loop 0 -delay 100 Rplot1.png Rplot2.png Rplot3.png Rplot4.png Rplot5.png ...

knit is looking for 'CF.mb' and cannot find it. There are other mysterious things going on that I must address. Right now, my major concern is diagnosing the knit problem.

Does this help you? I hope so.

1 Like

Hmm, it's hard to tell what's going on since it (unsurprisingly) references files that are internal to your environment. Have you tried rebuilding things up from the bottom. e.g. Try knitting just a default Rmd, make sure that works; add individual code chunks, etc.?

Hi Mara,

This sounds like a good idea. I did the following:

  1. Made a new vignette: devtools::use_vignette("CF-simple")

  2. Removed all 'r chucks.' See below.

  3. Ran 'knit' on 'CF-simple.'

  4. Results:

Updating CF documentation
Loading CF
Warning: The existing 'NAMESPACE' file was not generated by roxygen2, and will not be overwritten.
Updating vignettes
Documentation completed

==> R CMD INSTALL --preclean --no-multiarch --with-keep.source CF

Error: object 'CF.mb' not found
Execution halted

Exited with status 1.

Here is the top portion of my simple vignette:

title: 'CF: A _Stochastic_ Car-Following Package'
author: Paul J. Ossenbruggen
date: '2018-02-12'
    toc: yes
    toc_depth: 2
      collapsed: no
      smooth_scroll: no
    number_sections: no
    theme: united
    highlight: tango
vignette: >
  \VignetteIndexEntry{"Test Vignette"}

Vignettes are long form documentation ...

  1. I ran the following terminal command again:
PJO:CF PJO$ find . -name "CF.mb" -print

The empty CF.mb file still exists.

  1. I successfully ran the cfanim(60, 3, 30, 0.25) again.

Are there devtools or R CMD INSTALL settings that can control the search for the 'CF.mb' file?

Thanks again,

I'm at a loss here. It seems unlikely that CF.mb would be totally unrelated to your package (CF).

Are you trying to do something with blogdown, or are you creating a vignette, or both? If it's about a package vignette, the package development category might be of more use (you can change the category, no need to cross-post).

I am not sure what you mean by 'package development category.' In my mind, I have two independent R projects. Let me explain.

In my last post, I created the 'CF-simple.Rmd' within the 'CF' Project.' It uses 'knitr' and R markdown. I have a separate package, called 'academic-kickstart,' where I use 'blogdown.' If I understand correctly, I have two package development projects (or categories?) that are independent of one another. Thus if right, the 'CF.mb' problem is related to the 'CF' Project only.

As I mentioned, I uninstalled 'blogdown' and reinstalled it again. It did not solve the 'CF.mb' problem but it wasn't to difficult to do. Do you think uninstalling 'Rstudio' and reinstalling it would solve the problem?

Of course, if I can 'change the category' then it seems as the way to go. I look forward to your response.


I think I understand what you're saying. I was confused, since I wasn't clear on the line between package vs. the project/documentation around it.

I'm still unsure as to where the CF.mb artifact might be coming from— sorry that I can't be of more help.

Dont apologize. You have been a great help. You made good suggestions and asked good questions. As I mentioned, I am new to the R community. Twice, I submitted questions to Rstudio IDE and received feedback from this group but none of their responses came close to the help that you provided. For example, it was suggested that my submit my question to TidyVerse, which I did. This is where you stepped in to help.

You mentioned that I should 'change the category.' Given the way that I established my R projects, it appears that knitr should be working. Upon further reflection, I think uninstalling and installing the RStudio app is a waste of time. My gut tells me that there is setting in knitr that needs to be changed.

Given the fundamental nature of my problem with the mysterious "CF.mb" file, is it the proper protocol to ask Yihui Xie for his opinion. He has written a book on knitr and developed blogdown. I noticed on several occassions that Yihui, as well as Hadley Wickham, have addressed questions about blogdown from people like myself, who were unable to solve a problem.


1 Like