Gitbook in bookdown: Error in file(con,"r")

111 Views Asked by At

I'm trying to render a gitbook using bookdown in R Studio. This book has rendered well a number of times, so clearly I added something that is breaking it, but I'm having trouble figuring out what went wrong and where so I can fix it. Here's the error:

Error in file(con, "r") : cannot open the connection
In addition: Warning messages:
1: In dir.create(target_dir) : 'libs\gitbook-2.6.7' already exists
2: In file.copy(from, to, overwrite = TRUE, recursive = isdir, copy.mode = FALSE) :
  problem copying C:\Program Files\R\R-3.6.0\library\bookdown\resources\gitbook\css\plugin-search.css to libs\gitbook-2.6.7\css\plugin-search.css: Permission denied
3: In file(con, "r") :
  cannot open file 'libs/gitbook-2.6.7/css/plugin-search.css': Permission denied

It looks like it's trying to copy gitbook files and encountering errors, so I'm not sure what my code did to cause this. I tried installing gitbook on another drive, just in case it was something glitchy with permissions on the C: drive, but I just get the same error on that drive.

Thank you so much in advance!

0

There are 0 best solutions below