alexar
alexar

Reputation: 11

How to fix Blogdown::serve_site() timeout error?

I have tried the solutions I found online for this, but none of them seem to work...

Even after installing blogdown from github and updating hugo, I get a timeout error. remotes::install_github('rstudio/blogdown') blogdown::update_hugo()

That is, when I run blogdown::serve_site I get this error:

Launching the server via the command: C:\Users\Master\AppData\Roaming\Hugo\hugo.exe server --bind 127.0.0.1 -p 4321 --themesDir themes -t hugo-future-imperfect -D -F --navigateToChanged ERROR: The process "10244" 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.

Is there another way to fix this? What is causing this error?

Thanks!

Upvotes: 1

Views: 746

Answers (3)

proculus
proculus

Reputation: 1

I had the same problem on. Installing "go" (https://golang.org/doc/install) helped - this was missing after my clean install of big sur.

Upvotes: 0

Jochem Tolsma
Jochem Tolsma

Reputation: 36

I am running into the same problem.

blogdown::serve_site()

wont work:

Error: It took more than 30 seconds to launch the server. An error might have occurred with hugo. You may run blogdown::build_site() and see if it gives more info. If the site is very large and needs more time to be built, set options(blogdown.server.timeout) to a larger value.

although blogdown::build_site() works smoothly. The blogdown::serve_site() function works fine for a newly created project/website.

For repository see here.

Not sure if it is a blogdown, hugo or academic theme issue.

sessionInfo()

R version 4.0.3 (2020-10-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 17763)

Matrix products: default

locale:
[1] LC_COLLATE=Dutch_Netherlands.1252  LC_CTYPE=Dutch_Netherlands.1252   
[3] LC_MONETARY=Dutch_Netherlands.1252 LC_NUMERIC=C                      
[5] LC_TIME=Dutch_Netherlands.1252    

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

other attached packages:
[1] servr_0.20

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.5       rstudioapi_0.13  knitr_1.30       magrittr_2.0.1   mnormt_2.0.2     pbivnorm_0.6.0  
 [7] R6_2.5.0         rlang_0.4.9      tools_4.0.3      tmvnsim_1.0-2    xfun_0.19        htmltools_0.5.0 
[13] yaml_2.2.1       digest_0.6.27    lavaan_0.6-7     bookdown_0.21    processx_3.4.5   later_1.1.0.1   
[19] promises_1.1.1   ps_1.4.0         evaluate_0.14    rmarkdown_2.5    blogdown_0.21.50 compiler_4.0.3  
[25] stats4_4.0.3     jsonlite_1.7.1   httpuv_1.5.4 

Upvotes: 0

Cyrus Yip
Cyrus Yip

Reputation: 649

I have the same problem on Kubuntu 20.10. I installed latest blogdown and hugo serveral days ago. I have blogdown 0.21.47 and hugo 0.79.0 on Kubuntu. Finally, I found a method to fix it.

  1. Close Rstudio
  2. Open terminal
  3. Enter directory of your website
  4. Execute hugo server -D
  5. Press Ctrl C to stop
  6. Open Rstudio
  7. Click Addin -> BLOGDOWN -> Serve Site

I don't know why it works or whether it works in your case. Please test it and let us know whether it works.

Upvotes: 2

Related Questions