I want to create a site using blogdown.
Following instructions in the 1.2 A quick example of blogdown eBook, of blogdown, I created a new project based on new directory then got the error below.
I just installed Hugo and blogdown so I guess it's not about the package version. I tried to look for information about the error message, and noticed that there are several questions related to blogdown::new_site(). I checked those but it seems like my problem is different. Hope that it won't be a bad question to ask. Please check the information below.
blogdown::new_site()
Then I got messages:
Congratulations! Your new Hugo site is created in D:\R_programming\t2.
Just a few more steps and you're ready to go:
Download a theme into the same-named folder. Choose a theme from https://themes.gohugo.io/, or create your own with the "hugo new
theme " command.
Perhaps you want to add some content. You can add single files with "hugo new \.".
Start the built-in live server via "hugo server".
Visit https://gohugo.io/ for quickstart guide and full documentation.
trying URL 'https://github.com/yihui/hugo-lithium/archive/master.zip'
downloaded 115 KB
Then here comes the error message.
Error in site_root(config) : Cannot find a website under the current
working directory or upper-level directories
This is a copy of my sessionInfo()
sessionInfo()
R version 3.5.1 (2018-07-02) Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
Matrix products: default
locale: [1] LC_COLLATE=Chinese (Traditional)_Taiwan.950 [2]
LC_CTYPE=Chinese (Traditional)_Taiwan.950 [3] LC_MONETARY=Chinese
(Traditional)_Taiwan.950 [4] LC_NUMERIC=C
[5] LC_TIME=Chinese (Traditional)_Taiwan.950
attached base packages: [1] stats graphics grDevices utils
datasets methods base
loaded via a namespace (and not attached): [1] compiler_3.5.1
assertthat_0.2.0 bookdown_0.8 cli_1.0.1 [5] tools_3.5.1
withr_2.1.2 rstudioapi_0.8 yaml_2.2.0 [9] crayon_1.3.4
blogdown_0.9 knitr_1.21 xfun_0.4 [13]
sessioninfo_1.1.1
Related
I have made a site using blogdown but never got around to deploying it. I haven't touched my site for maybe a month and half but the live preview was working at that time. I could see a preview of my site in the Viewer tab.
Today, I opened my project and blogdown initiated the live preview on startup. However, I got the following error:
ERROR: The process "2848" not found.
Error: It took more than 30 seconds to launch the server. There may be something wrong. The process has been killed. If the site needs more time to be built and launched, set options(blogdown.server.timeout) to a larger value.
I restarted R and my device. I updated R, Rstudio and all of my packages. I still get an error but the process number changes every time I open the project or run blogdown::serve_site().
I thought that maybe my site is taking too long to load because it's too large even though it only has a few posts so far. So, I tried creating a new test site using the default Hugo theme and it started up as expected with the preview. However, if I try to change the Hugo theme using install_theme() I've run into this same error message.
> sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19041)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] Rcpp_1.0.5 bookdown_0.21 ps_1.4.0 digest_0.6.27
[5] later_1.1.0.1 R6_2.5.0 jsonlite_1.7.1 magrittr_1.5
[9] evaluate_0.14 blogdown_0.21 rlang_0.4.8 promises_1.1.1
[13] rstudioapi_0.11 rmarkdown_2.5 tools_4.0.3 servr_0.20
[17] processx_3.4.4 httpuv_1.5.4 xfun_0.18 yaml_2.2.1
[21] compiler_4.0.3 htmltools_0.5.0 knitr_1.30
Update 10/30: Issue resolved
As suggested in the comments, I ran blogdown::build_site which gave me different errors. I fixed the first one about a bad request. I am not able to reproduce the error now but the fix was to add ignoreErrors =["error-remote-getjson"] to my config.toml file
Since you didn't provide a reproducible example, my current guess is that you run into a blogdown bug that I have fixed two weeks ago. Please try the current development version:
remotes::install_github('rstudio/blogdown')
Remember to restart R.
I installed the shiny package, but after running the example file: runExample("01_hello"), the pop up does not show the expected interface (for example, there's no sliding bar, and nothing happens after entering manually a number of bins). I see the same effect if I view it in an external browser as well. See the below picture for better understanding. I tried similar cases and it is always the same...
library(shiny)
runExample("01_hello")
The app that opens looks like this:
But should look like this:
I just installed the latest version of R and RStudio for Windows10 (64bit) but still have the issue... Also tried to update the graphic drivers in case the problem was with them, but no solution so far. Any hints?
Here the session info.
R version 3.5.3 (2019-03-11)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
Matrix products: default
locale:
[1] LC_COLLATE=German_Germany.1252 LC_CTYPE=German_Germany.1252
[3] LC_MONETARY=German_Germany.1252 LC_NUMERIC=C
[5] LC_TIME=German_Germany.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] dplyr_0.8.0.1
loaded via a namespace (and not attached):
[1] Rcpp_1.0.1 crayon_1.3.4 assertthat_0.2.1 R6_2.4.0
[5] magrittr_1.5 pillar_1.3.1 rlang_0.3.4 rstudioapi_0.10
[9] tools_3.5.3 glue_1.3.1 purrr_0.3.2 xfun_0.6
[13] compiler_3.5.3 pkgconfig_2.0.2 knitr_1.22 tidyselect_0.2.5
[17] tibble_2.1.1
Finally I think I got an answer. My R library was saved under a path that was not compatible with shiny (meaning that the path had special signs like à). I solved the problem deleting the libraries and reinstalling them in a new path C:/Program Files/R/R-3.5.3/library. For that may be needed to run R-Studio as admin.
Thanks for the help, was much appreciated :)
If I try to run blogdown::new_site() I get an error message I suspect being a linux/windows conversion problem of slashes maybe?
blogdown::new_site()
Congratulations! Your new Hugo site is created in D:\Documents\Blog.
Just a few more steps and you're ready to go:
1. Download a theme into the same-named folder.
Choose a theme from https://themes.gohugo.io/, or
create your own with the "hugo new theme <THEMENAME>" command.
2. Perhaps you want to add some content. You can add single files
with "hugo new <SECTIONNAME>\<FILENAME>.<FORMAT>".
3. Start the built-in live server via "hugo server".
Visit https://gohugo.io/ for quickstart guide and full documentation.
trying URL 'https://github.com/yihui/hugo-lithium-theme/archive/master.zip'
Content length 119078 bytes (116 KB)
downloaded 116 KB
Error in gsub(tmpdir, ".", zipdir) :
invalid regular expression '.\3aec55bc496d', reason 'Invalid back reference'
Don't quite get what's going on there... I the command on an empty directory and tied it via Rstudio also trying a different template gcushen/hugo-academic which caused the same error message...
I'm running R on a windows machine an all packages are up to date I believe...
sessionInfo()
R version 3.4.3 (2017-11-30)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
Matrix products: default
locale:
[1] LC_COLLATE=English_United Kingdom.1252 LC_CTYPE=English_United Kingdom.1252
[3] LC_MONETARY=English_United Kingdom.1252 LC_NUMERIC=C
[5] LC_TIME=English_United Kingdom.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] blogdown_0.5.9
loaded via a namespace (and not attached):
[1] compiler_3.4.3 bookdown_0.7 tools_3.4.3 yaml_2.1.18 knitr_1.20 xfun_0.1
As mentioned in my comment, this was indeed a bug in blogdown tracing back to differences in how Windows and Unix handle slashes in path names (or more specifically, differences in how tempfile() and utils::unzip() handle slashes in their output on Windows).
The issue should now be fixed as of version 0.5.10 of blogdown, which you can install using devtools::install_github("rstudio/blogdown").
I want to R CMD check with RStudio my package (for this question I call it pkg). But I get the following error message:
* preparing 'pkg':
* checking DESCRIPTION meta-information ... OK
* installing the package to build vignettes
* creating vignettes ...Error in find_vignette_product(name, by = "weave", dir = docdir, engine = engine) :
Failed to locate the 'weave' output file (by engine 'utils::Sweave') for vignette with name 'my-vignette'. The following files exist in directory 'C:/Users/name/AppData/Local/Temp/RtmpQLnSjE/Rbuild244434d45c05/pkg/vignettes': 'my-vignette.R', 'my-vignette.Rmd'
Execution halted
Error: Command failed (1)
In addition: Warning message:
`cleanup` is deprecated
Execution halted
Exited with status 1.
One first thing, where something might got wrong is that there is no folder called RtmpQLnSjE in my C:/Users/name/AppData/Local/Temp/ directory. Running my Rmd file by hand, does not generate any errors.
I update RStudio to the latest version 1.1.423 and this is my SessionInfo():
R version 3.4.3 (2017-11-30)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
Matrix products: default
locale:
[1] LC_COLLATE=German_Germany.1252 LC_CTYPE=German_Germany.1252 LC_MONETARY=German_Germany.1252
[4] LC_NUMERIC=C LC_TIME=German_Germany.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] MCMCglmm_2.25 ape_5.0 coda_0.19-1 lme4_1.1-15 Rcpp_0.12.15 Matrix_1.2-12 hmi_0.9.4
loaded via a namespace (and not attached):
[1] lattice_0.20-35 corpcor_1.6.9 digest_0.6.15 withr_2.1.1 MASS_7.3-48 grid_3.4.3
[7] nlme_3.1-131 cubature_1.3-11 minqa_1.2.4 nloptr_1.0.4 devtools_1.13.4 splines_3.4.3
[13] tools_3.4.3 yaml_2.1.16 parallel_3.4.3 compiler_3.4.3 memoise_1.1.0 tensorA_0.36
Concluding as an answer:
Failed to locate the 'weave' output file
This error can have several root causes and is not always easy to trace down. However, there is a good chance that it is related to code inside the vignette, in particular code navigating directories and such (e.g. setwd() or other functions that may rely on relative paths that could differ between a stand-alone run and the more involved R CMD check)
I recently ran across this when a vignette file had a space in the name (like "My Vignette.Rmd"). It was creating an html file called My-Vignette.html. I think it's the hyphen in the name that was causing issues (based on the answer above along with what I'm seeing.)
After successfully loading blogdown and installing Hugo, I have trouble creating a new site with new_site(dir = 'test') in an empty 'test' folder. First, I get the following positive message:
Congratulations! Your new Hugo site is created in C:....\Dropbox\test.
Just a few more steps and you're ready to go:
Download a theme into the same-named folder.
or create your own with the "hugo new theme " command.
Perhaps you want to add some content. You can add single files
with "hugo new \.".
Start the built-in live server via "hugo server".
trying URL 'https://github.com/yihui/hugo-lithium-theme/archive/master.zip'
Content type 'application/zip' length 119666 bytes (116 KB)
downloaded 116 KB
Now comes the error msg.
Error in list.files(dir) : invalid 'path' argument
The current R session info gives this:
R version 3.3.2 (2016-10-31)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
locale:
[1] LC_COLLATE=German_Germany.1252 LC_CTYPE=German_Germany.1252 LC_MONETARY=German_Germany.1252
[4] LC_NUMERIC=C LC_TIME=German_Germany.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] blogdown_0.0.35
loaded via a namespace (and not attached):
[1] bookdown_0.3.19 tools_3.3.2 rstudioapi_0.6 knitr_1.15.20
Any idea what I am doing wrong?
This should be a temporary bug that existed for a couple of hours. Please reinstall blogdown from Github:
devtools::install_github('rstudio/blogdown')