r-lib / remotes

Install R packages from GitHub, GitLab, Bitbucket, git, svn repositories, URLs
https://remotes.r-lib.org/
Other
331 stars 152 forks source link

build vignettes failed in original R (not in RStudio) #696

Closed Yunuuuu closed 2 years ago

Yunuuuu commented 2 years ago

To produce this, restart a new R session in cmd.exe (I'm using windows system), this will only occur the first time running remotes::install_github with build_vignettes = TRUE, and the second time running remotes::install_github will install packages successfully.

remotes::install_github("r-lib/here", build_vignettes = TRUE, force = TRUE)
#> Downloading GitHub repo r-lib/here@HEAD
#> 
#> * checking for file 'C:\Users\yunyu\AppData\Local\Temp\RtmpWcFzrh\remotes40107d3b52e\r-lib-here-a5dbffa/DESCRIPTION' ... OK
#> * preparing 'here':
#> * checking DESCRIPTION meta-information ... OK
#> * installing the package to build vignettes
#> * creating vignettes ... ERROR
#> --- re-building 'here.Rmd' using rmarkdown
#> Error: processing vignette 'here.Rmd' failed with diagnostics:
#> Pandoc is required to build R Markdown vignettes but not available. Please make sure it is installed.
#> --- failed re-building 'here.Rmd'
#> 
#> --- re-building 'rmarkdown.Rmd' using rmarkdown
#> Error: processing vignette 'rmarkdown.Rmd' failed with diagnostics:
#> Pandoc is required to build R Markdown vignettes but not available. Please make sure it is installed.
#> --- failed re-building 'rmarkdown.Rmd'
#> 
#> SUMMARY: processing the following files failed:
#>   'here.Rmd' 'rmarkdown.Rmd'
#> 
#> Error: Vignette re-building failed.
#> Execution halted
#> Error: Failed to install 'here' from GitHub:
#>   System command 'Rcmd.exe' failed, exit status: 1, stdout & stderr were printed
remotes::install_github("r-lib/here", build_vignettes = TRUE, force = TRUE)
#> Downloading GitHub repo r-lib/here@HEAD
#> 
#> * checking for file 'C:\Users\yunyu\AppData\Local\Temp\RtmpWcFzrh\remotes40103d464caa\r-lib-here-a5dbffa/DESCRIPTION' ... OK
#> * preparing 'here':
#> * checking DESCRIPTION meta-information ... OK
#> * installing the package to build vignettes
#> * creating vignettes ... OK
#> * checking for LF line-endings in source and make files and shell scripts
#> * checking for empty or unneeded directories
#> * building 'here_1.0.1.9000.tar.gz'
#> 
sessioninfo::session_info()
#> - Session info ---------------------------------------------------------------
#>  setting  value
#>  version  R version 4.1.2 (2021-11-01)
#>  os       Windows 10 x64 (build 19042)
#>  system   x86_64, mingw32
#>  ui       RTerm
#>  language en
#>  collate  Chinese (Simplified)_China.936
#>  ctype    Chinese (Simplified)_China.936
#>  tz       Asia/Taipei
#>  date     2022-02-17
#>  pandoc   2.17.1.1 @ C:/Users/yunyu/AppData/Local/Pandoc/ (via rmarkdown)
#> 
#> - Packages -------------------------------------------------------------------
#>  package     * version    date (UTC) lib source
#>  callr         3.7.0      2021-04-20 [1] RSPM
#>  cli           3.2.0      2022-02-14 [1] RSPM
#>  crayon        1.5.0      2022-02-14 [1] RSPM
#>  curl          4.3.2      2021-06-23 [1] RSPM
#>  digest        0.6.29     2021-12-01 [1] RSPM
#>  ellipsis      0.3.2      2021-04-29 [1] RSPM
#>  evaluate      0.14       2019-05-28 [1] RSPM
#>  fansi         1.0.2      2022-01-14 [1] RSPM
#>  fastmap       1.1.0      2021-01-25 [1] RSPM
#>  fs            1.5.2      2021-12-08 [1] RSPM
#>  glue          1.6.1      2022-01-22 [1] RSPM
#>  highr         0.9        2021-04-16 [1] RSPM
#>  htmltools     0.5.2      2021-08-25 [1] RSPM
#>  knitr         1.37       2021-12-16 [1] RSPM
#>  lifecycle     1.0.1      2021-09-24 [1] RSPM
#>  magrittr      2.0.2      2022-01-26 [1] RSPM
#>  pillar        1.7.0      2022-02-01 [1] RSPM
#>  pkgbuild      1.3.1      2021-12-20 [1] RSPM
#>  pkgconfig     2.0.3      2019-09-22 [1] RSPM
#>  prettyunits   1.1.1      2020-01-24 [1] RSPM
#>  processx      3.5.2      2021-04-30 [1] RSPM
#>  ps            1.6.0      2021-02-28 [1] RSPM
#>  purrr         0.3.4      2020-04-17 [1] RSPM
#>  R.cache       0.15.0     2021-04-30 [1] RSPM
#>  R.methodsS3   1.8.1      2020-08-26 [1] RSPM
#>  R.oo          1.24.0     2020-08-26 [1] RSPM
#>  R.utils       2.11.0     2021-09-26 [1] RSPM
#>  R6            2.5.1      2021-08-19 [1] RSPM
#>  remotes       2.4.2      2021-11-30 [1] RSPM
#>  reprex        2.0.1      2021-08-05 [1] RSPM
#>  rlang         1.0.1      2022-02-03 [1] RSPM
#>  rmarkdown     2.11       2021-09-14 [1] RSPM
#>  rprojroot     2.0.2      2020-11-15 [1] RSPM
#>  sessioninfo   1.2.2      2021-12-06 [1] RSPM
#>  stringi       1.7.6      2021-11-29 [1] RSPM
#>  stringr       1.4.0      2019-02-10 [1] RSPM
#>  styler        1.6.2.9000 2022-02-13 [1] Github (r-lib/styler@e435f57)
#>  tibble        3.1.6      2021-11-07 [1] RSPM
#>  utf8          1.2.2      2021-07-24 [1] RSPM
#>  vctrs         0.3.8      2021-04-29 [1] RSPM
#>  withr         2.4.3      2021-11-30 [1] RSPM
#>  xfun          0.29       2021-12-14 [1] RSPM
#>  yaml          2.2.2      2022-01-25 [1] RSPM
#> 
#>  [1] C:/Yun/R/R-4.1.2/library
#> 
#> ------------------------------------------------------------------------------

Created on 2022-02-17 by the reprex package (v2.0.1)

Yunuuuu commented 2 years ago

And the pandoc is installed

rmarkdown::pandoc_available()
#> [1] TRUE
rmarkdown::pandoc_version()
#> [1] '2.17.1.1'

Created on 2022-02-17 by the reprex package (v2.0.1)

Yunuuuu commented 2 years ago

After updating all packages, this is fixed. Thanks!