Error saving/creating notebooks/markdown - "Error saving file, no such directory"



Upon installing both R and R Studio, I've been unable to save or create new notebooks within R Studio. I'm greeted with the error:

Error saving file, no such directory (image attached)

I have no idea why I'm receiving this error. Also, sometimes it allows me to save my .Rmd files, but I receive this error message at the top:

Error creating notebook: cannot open the connection

Any idea on how to resolve this? I'm aware that there are archived topics concerning this, but I've found no help or no answer to this so far.


Attached image:

Edit: My session info, if it helps:

R version 3.5.1 (2018-07-02)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS High Sierra 10.13.6

Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib

[1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
 [1] compiler_3.5.1  backports_1.1.2 magrittr_1.5    rprojroot_1.3-2 htmltools_0.3.6
 [6] tools_3.5.1     base64enc_0.1-3 yaml_2.2.0      Rcpp_0.12.18    stringi_1.2.4  
[11] rmarkdown_1.10  knitr_1.20      jsonlite_1.5    stringr_1.3.1   digest_0.6.16  
[16] evaluate_0.11


Most likely, RStudio is failing to save some of its session-related state into the project's accompanying .Rproj.user folder. You could try closing RStudio, moving that folder out of the way, and then restarting RStudio.

(If not that folder, you could also try the global state folder at ~/.rstudio-desktop)

Also: are you working with a local filesystem, or perhaps a network filesystem of some kind?


There's no such file in my system as .Rproj.user, but there is a file ~/.rstudio-desktop. I've moved that folder and reopened it, and did a quick check by opening a previous .Rmd, editing it and saving it, and creating a new .Rmd and saving it. No problems so far, which is great. Will report back if the problems re-appear!