Pkgdown: Issue building: [ENOENT] Failed to remove

Created on 5 Oct 2018  Β·  9Comments  Β·  Source: r-lib/pkgdown

Hey guys, first of all: thank you for this awesome package! I thought that I might have to do something like pkgdown of my own until I discovered about it.

  • OS: Arch Linux
  • R: 3.5.1

My problem, I would love to make a website like valr, that's why I decided to download its content and then build it of my own. But when I tried to, the following error is thrown:

> pkgdown::build_site()
══ Building pkgdown site ═══════════════════════════════════════════════════════
Reading from: '/home/farm/Documents/valr'
Writing to:   '/home/farm/Documents/valr/docs'
── Initialising site ───────────────────────────────────────────────────────────
Writing 'sitemap.xml'
Creating 'favicon.ico'
── Building home ───────────────────────────────────────────────────────────────
<ENOENT: [ENOENT] Failed to remove '/tmp/RtmpRVCnFs/file3532401c6a3.html': no such file or directory>
Error: [ENOENT] Failed to remove '/tmp/RtmpRVCnFs/file3532401c6a3.html': no such file or directory
Execution halted

Before running pkgdown I ran _devtools::check()_ and fixed all of its warnings and errors -- missing dependencies and things like that -- but right now I'm having a little bit of trouble debugging this error. I don't know whether or is a valr error or not, so I have decided to open an issue here before talking to folks at valr about it.

Is there any dependency missing or some like that?

Thanks again for this package and I'm waiting for your response :)

Most helpful comment

I got this same error and also resolved it by installing Pandoc. A more user friendly error would be appreciated.

All 9 comments

This doesn't look like an error in valr; it looks more like an issue on your file system. Perhaps you could download the pkgdown package itself and build its docs, it's a much simpler package and website.

It throws a similar error.

This is most likely an issue with your local system. Could you provide the output of sesssioninfo::session_info().

Sure, @jayhesselberth:

─ Session info ───────────────────────────────────────────────────────────────
 setting  value                       
 version  R version 3.5.1 (2018-07-02)
 os       Manjaro Linux               
 system   x86_64, linux-gnu           
 ui       X11                         
 language (EN)                        
 collate  en_US.UTF-8                 
 ctype    en_US.UTF-8                 
 tz       America/Sao_Paulo           
 date     2018-10-06                  

─ Packages ───────────────────────────────────────────────────────────────────
 package     * version date       lib source        
 assertthat    0.2.0   2017-04-11 [1] CRAN (R 3.5.1)
 cli           1.0.1   2018-09-25 [1] CRAN (R 3.5.1)
 crayon        1.3.4   2017-09-16 [1] CRAN (R 3.5.1)
 sessioninfo * 1.1.0   2018-09-25 [1] CRAN (R 3.5.1)
 withr         2.1.2   2018-03-15 [1] CRAN (R 3.5.1)

@jayhesselberth , also ran devltools::check() here, and I got the following:

Status: 1 ERROR
See
  β€˜/tmp/RtmpLchVPG/pkgdown.Rcheck/00check.log’
for details.

R CMD check results
1 error  | 0 warnings | 0 notes
checking tests ... ERROR
  Running β€˜testthat.R’ [10s/16s]
Running the tests in β€˜tests/testthat.R’ failed.
Last 13 lines of output:
  21: project_name()
  22: path_file(base_path)
  23: proj_get()
  24: proj_set(".", quiet = quiet)
  25: stop_glue("Path {value(path)} does not appear to be inside a project or package.")

  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 223 SKIPPED: 18 FAILED: 4
  1. Error: docsearch.json and sitemap.xml are valid (@test-build-search-docs.R#9) 
  2. Error: can build package without any index/readme (@test-build_site.R#7) 
  3. Error: extra.css and extra.js copied and linked (@test-init.R#5) 
  4. Error: single extra.css correctly copied (@test-init.R#24) 

  Error: testthat unit tests failed
  Execution halted

I found my mistake while trying to build another package from scratch... Pandoc was missing in my system, had to install it through https://aur.archlinux.org/packages/pandoc-bin/

I got this same error and also resolved it by installing Pandoc. A more user friendly error would be appreciated.

Just for the benefit of anyone coming here who might have the same situation as mine. I run into the same error and it turned out it was a problem of having the RStudio project on a network folder.
The issue was resolved by mapping the folder to a local drive and opening the project using the mapped drive. See this reply to a similar question on Stackoverflow.

To follow up on this issue, I seem to be hitting this error on RStudio Server Pro using a temp SSD on Azure, defined via TMPDIR (e.g. /mnt/resource).

When attempting to run pkgdown::build_site(), I see this error in the R console but it runs clean inside of an RStudio session:

Error : [ENOENT] Failed to remove '/mnt/resource/RtmpMT4f60/file1301247c231b4.html': no such file or directory
Error: callr subprocess failed: [ENOENT] Failed to remove '/mnt/resource/RtmpMT4f60/file1301247c231b4.html': no such file or directory
Backtrace:
    β–ˆ
 1. └─bb8::build_site()
 2.   └─pkgdown::build_site(..., devel = devel, preview = preview)
 3.     └─pkgdown:::build_site_external(...)
 4.       └─callr::r(...)
 5.         └─callr:::get_result(output = out, options)
 6.           └─throw(new_callr_error(output, msg), parent = err[[2]])

Let me know if there are some useful shell configuration settings I can post, and I'll follow up.

PS I'm using conda pandoc (2.7.3), because the pandoc version bundled with RHEL 7 (1.12.3.1) is ancient:
/usr/local/conda/envs/pandoc/bin/pandoc. I'll see if reverting back to the system version fixes the issue.

Update: Yep, this seems to be a pandoc issue. Reverting back to system Pandoc on RHEL 7 seems to avoid this error. Thanks for the tip!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

maelle picture maelle  Β·  6Comments

stufield picture stufield  Β·  5Comments

echasnovski picture echasnovski  Β·  5Comments

dfalbel picture dfalbel  Β·  10Comments

Anirban166 picture Anirban166  Β·  8Comments