Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

render not found #1990

Closed
3 tasks done
data-al opened this issue Dec 21, 2020 · 57 comments
Closed
3 tasks done

render not found #1990

data-al opened this issue Dec 21, 2020 · 57 comments
Labels
bug an unexpected problem or unintended behavior RStudio IDE concerns the rstudio ide

Comments

@data-al
Copy link

data-al commented Dec 21, 2020

After installing the latest rmarkdown package i have this issue trying to knit the default or any other .rmd :

[1] 127
Warning message:
In system(paste0("rmarkdown::render '", input, "'")) :
  'rmarkdown::render' not found

No document is produced. I'm guessing it's some kind of problem with finding the function of the package ? Any guidance is appreciated

xfun::session_info('rmarkdown')
R version 4.0.2 (2020-06-22)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18363), RStudio 1.4.1074

Locale:
LC_COLLATE=English_United Kingdom.1252 LC_CTYPE=English_United Kingdom.1252
LC_MONETARY=English_United Kingdom.1252 LC_NUMERIC=C
LC_TIME=English_United Kingdom.1252

Package version:
base64enc_0.1.3 digest_0.6.27 evaluate_0.14 glue_1.4.2 graphics_4.0.2 grDevices_4.0.2 highr_0.8
htmltools_0.5.0 jsonlite_1.7.1 knitr_1.30 magrittr_1.5 markdown_1.1 methods_4.0.2 mime_0.9
rlang_0.4.8 rmarkdown_2.6 stats_4.0.2 stringi_1.5.3 stringr_1.4.0 tinytex_0.27 tools_4.0.2
utils_4.0.2 xfun_0.19 yaml_2.2.1
Warning messages:
1: In get(Info[i, 1], envir = env) : internal error -3 in R_decompress1
2: In get(Info[i, 1], envir = env) : internal error -3 in R_decompress1
3: In get(Info[i, 1], envir = env) : internal error -3 in R_decompress1
4: In get(Info[i, 1], envir = env) : internal error -3 in R_decompress1
5: In get(Info[i, 1], envir = env) : internal error -3 in R_decompress1
6: In get(Info[i, 1], envir = env) : internal error -3 in R_decompress1


By filing an issue to this repo, I promise that

  • I have fully read the issue guide at https://yihui.org/issue/.
  • I have provided the necessary information about my issue.
    • If I'm asking a question, I have already asked it on Stack Overflow or RStudio Community, waited for at least 24 hours, and included a link to my question there.
    • If I'm filing a bug report, I have included a minimal, self-contained, and reproducible example, and have also included xfun::session_info('rmarkdown'). I have upgraded all my packages to their latest versions (e.g., R, RStudio, and R packages), and also tried the development version: remotes::install_github('rstudio/rmarkdown').
    • If I have posted the same issue elsewhere, I have also mentioned it in this issue.
  • I have learned the Github Markdown syntax, and formatted my issue correctly.

I understand that my issue may be closed if I don't fulfill my promises.

@cderv
Copy link
Collaborator

cderv commented Dec 21, 2020

After installing the latest rmarkdown package i have this issue trying to knit the default or any other .rmd :

Can you be more precise about what you are doing ?

What I did :

  • Open RStudio
  • Create a new Rmarkdown file from the menu to use the default template one
  • Save the file.
  • Click the knit button

This will render the file correctly without any error.

I let you restart RStudio and R, and try again. Thank you.

@cderv cderv added the question general questions - not an issue label Dec 21, 2020
@data-al data-al closed this as completed Dec 29, 2020
@dylangomes
Copy link

In case it is helpful to anyone: I got this error today after an R version 4.0.4 update. I solved it by updating tinytex.

install.packages("tinytex")

@cderv
Copy link
Collaborator

cderv commented Mar 11, 2021

This error is still puzzling to me.
Can you share more on what you were rendering and what you have done ?

I am not sure to see how tinytex R package relates to

[1] 127
Warning message:
In system(paste0("rmarkdown::render '", input, "'")) :
  'rmarkdown::render' not found

Is this with a pdf file ? That would indeed require tinytex, but the error is not very informative. I would like to improve that.

If you can share anything to help us reproduce and / or identify the cause that would help.

Thank you

@dylangomes
Copy link

dylangomes commented Mar 11, 2021

It is indeed puzzling. After updating R to the latest version (4.0.4), trying to knit a markdown doc (even the default Rmd, without added code) to pdf would throw that error (I know it says warning, but it will not knit). I closed and opened Rstudio again and the same thing. I updated the rmarkdown package, which didn't help, but then updated tinytex, and I now longer receive the error. Rmd -> pdf now has no issues.

As an aside, I did initially try knitting to html as well, which didn't work either at first. It now does work. I am assuming updating rmarkdown helped because I too cannot see how tinytex has anything to do with it, but I didn't check knitting to pdf in between those steps, so I cannot really say.. I wish I could be more informative.

@cderv
Copy link
Collaborator

cderv commented Mar 11, 2021

Thanks for sharing. Let's see if other encounter the same thing.

@JosephLazarus
Copy link

I am having the same issue.
[1] 127
Warning message:
In system(paste0("rmarkdown::render '", input, "'")) :
'rmarkdown::render' not found

I've updated R and all the packages. Restarted R. But still I get this error message

@cderv
Copy link
Collaborator

cderv commented Mar 17, 2021

@JosephLazarus Can you share your R version and R Studio version ?
Also, do you have some steps to help us know when this issue arise ?

We need more information to be able to reproduce and fix this issue. I'll reopen in the meantime. thanks!

@cderv cderv reopened this Mar 17, 2021
@cderv cderv added bug an unexpected problem or unintended behavior and removed question general questions - not an issue labels Mar 17, 2021
@yihui
Copy link
Member

yihui commented Mar 17, 2021

I quickly search for the code system(paste0("rmarkdown::render '", input, "'")) yesterday on both Github and Google, but didn't find it anywhere, so I have no idea who wrote this obviously wrong code and how it was executed. Since two people have reported the same problem, I guess the problem must be real, but we just don't know how to reproduce it.

@cderv
Copy link
Collaborator

cderv commented Mar 17, 2021

Yes I did exactly the same thing but did not found any hit. I am really curious where this comes from. 🤔

@cderv
Copy link
Collaborator

cderv commented Mar 17, 2021

Oh in fact I recall where I saw that! and it is the only hint I have:

RStudio IDE does this paste thing in here:
https://github.com/rstudio/rstudio/blob/master/src/cpp/session/modules/rmarkdown/SessionRMarkdown.cpp#L536
and I think it comes from there.

However, this should only be activated (the pasting) if rmarkdown::render is not seen as a R call. This feature (calling system(paste0() is used for the new quarto rendering. However, it should not happen has rmarkdown::render should be able to evaluate in R.

So there is a state where rmarkdown is not available when this code is run and this cause this error I believe. I'll try to reproduce this state maybe.

What do you think ?

@cderv
Copy link
Collaborator

cderv commented Mar 17, 2021

Yeah I can't reproduce - if you don't have rmarkdown installed, clicking the knit button will asked you to install it. And after that no error.

Maybe this is tied to a specific rstudio version and this has been fixed ? I tried daily and preview.

@cderv
Copy link
Collaborator

cderv commented Mar 19, 2021

@data-al @dylangomes @JosephLazarus which version of RStudio are you using ? which OS are you on ?

Considering the above hint, it could be link a RStudio IDE and maybe the last version solve this. Can you share with us the information ? and maybe update to last released version of RStudio IDE ?

@souckmi
Copy link

souckmi commented Mar 24, 2021

Hello,

I encountered the same issue with the same error message few times already. Today I tried install.packages("tinytex") recommended @dylangomes and it helped. Restarting or updating had no effect. What I noticed is that the problem reoccurs when I try to knit a new rmarkdown. After that I am not able to knit any other older markdowns.

If it helps in any way:

xfun::session_info('rmarkdown')
R version 3.6.2 (2019-12-12)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19041), RStudio 1.4.1103

Locale:
LC_COLLATE=Czech_Czechia.1250 LC_CTYPE=Czech_Czechia.1250
LC_MONETARY=Czech_Czechia.1250 LC_NUMERIC=C
LC_TIME=Czech_Czechia.1250

Package version:
digest_0.6.25 evaluate_0.14 glue_1.4.2
graphics_3.6.2 grDevices_3.6.2 highr_0.8
htmltools_0.4.0 jsonlite_1.7.2 knitr_1.31
magrittr_2.0.1 markdown_1.1 methods_3.6.2
mime_0.10 Rcpp_1.0.4 rlang_0.4.7
rmarkdown_2.6 stats_3.6.2 stringi_1.5.3
stringr_1.4.0 tinytex_0.30 tools_3.6.2
utils_3.6.2 xfun_0.22 yaml_2.2.1

Pandoc version: 2.11.2

Thank you
Have a great day everyone

@cderv
Copy link
Collaborator

cderv commented Mar 24, 2021

@souckmi sorry you also hit this issue.

Which is your RStudio version please ?
Can you give us some step to try reproduce ?
For now we don't succeed in reproducing this behavior on our side which makes it very difficult to debug

@souckmi
Copy link

souckmi commented Mar 24, 2021

My RStudio version is 1.4.1103.

Unfortunately I cannot say more than what was already said here. It seems to happen quite random, but if it occurs again I will try my best to give more information about what preceded.

@cderv
Copy link
Collaborator

cderv commented Mar 24, 2021

Can you upgrade to last release bug fix version which is 1.4.1106 ?
https://rstudio.com/products/rstudio/download/#download

This last version was released shortly after first 1.4 release as a bugfix version. It is possible that this comes from RStudio and it has been fixed already.

Thank you!

@souckmi
Copy link

souckmi commented Mar 24, 2021

Sure! I will let you know if I encounter it sometime anyway after that.

@fytsai
Copy link

fytsai commented Mar 25, 2021

I also encountered this issue today. It was solved after following @dylangomes suggestion to re-install tinytex. Thanks for the information.
I use R 4.0.4, RStudio 1.4.1106, Windows 10.

@cderv
Copy link
Collaborator

cderv commented Mar 25, 2021

Thanks for sharing @fytsai.
It is really puzzling to me that re-installing tinytex (install.packages("tinytex") would fix such an issue - I am not sure how it relates. Anyway, since it helped you, I'll look in this direction. Thank you !

@yihui
Copy link
Member

yihui commented Mar 25, 2021

This is such a funny mystery to us. I can't imagine why the tinytex package could be relevant. If we can ever figure it out, it might become an inspiration for me to write a mystery book someday :)

@themeaux
Copy link

themeaux commented Apr 9, 2021

I was able to get it out of this error by reinstalling the htmltools and jsonlite packages.

@cderv
Copy link
Collaborator

cderv commented Apr 10, 2021

by reinstalling the htmltools and jsonlite packages.

This now gets even weirder for us. It is really a funny mystery... how those package could be link to that ?

Our best guess was something related to RStudio version. 🤔 we have still no clue to where this comes from unfortunately.

@wyattgarrett
Copy link

I had a similar issue but by changing the file name was able to knit to pdf again.

@cderv
Copy link
Collaborator

cderv commented Apr 21, 2021

What was your filename in the first place ?
We are still gathering hints on what is happening as we don't have a clue yet of what the cause is. We're not able to reproduce yet so it is hard to fix.

Any information you think could be useful will help us.

And sorry you encountered this.

@wyattgarrett
Copy link

So the original file name was "Yahoo-Tumblr Case Study", and when I changed it to "Yahoo-Tumblr Case Study Final Version" I could suddenly knit to pdf again with out the render error. After doing a bit more work the error showed up again so I saved it as Version 2 and it was able to knit once again.

Prior to the error occurring I had tried import a bunch of packages like imager, shiny to find the best way to display an image. When I tried to load Bioconductor using the code below I got a spinning wheel and I think that was when I first wasn't able to knit to pdf.

if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install(version = "3.12")

Before I got to the render error I first had to deal with another error. My installed packages like ggplot and xts returned "Error: package ‘ggplot2’ could not be loaded" so I tried to reinstall them, and then reinstalled R and Rstudio which solved the problem. Then when I tried to knit to pdf I ran into the render issue. So in a hail mary I changed the file name and everything worked, and I liked R and Rstudio again.

Hope this is helpful.

@cderv
Copy link
Collaborator

cderv commented Jun 3, 2021

I have an internal function xfun:::broken_packages()

🤯 I would have used this function a lot - This is really useful! So many things hidden. Too bad it is not working on Windows (forking not available) - I may try to fix it.

@yihui

This comment has been minimized.

@yirangu
Copy link

yirangu commented Jun 11, 2021

I encountered the same issue as well and this is funny because it occurs after I tried to debug under the guide of Yihui's website...
Hahaha I could knit to word and HTML but I couldn't knit to pdf before I tried to debug it. And now I can't knit to any of them.
I'll try to delete RStudio and reinstall the latest version right now. Hope things could work.

@yirangu
Copy link

yirangu commented Jun 11, 2021

Hahaha the reinstall of RStudio really worked! Just remember to reinstall both the RStudio and the LaTex again.

clrpackages pushed a commit to clearlinux-pkgs/R-xfun that referenced this issue Jun 17, 2021
HughParsonage (1):
      Include PACKAGE arg to avoid unresolved namespace (#53)

Liming (1):
      fix #54: iterate through the rules correctly in proj_root() (#55)

Yihui Xie (8):
      start the next version
      improve, document, and export the broken_packages() function (rstudio/rmarkdown#1990 (comment))
      roxygenize and bump version
      don't use parallel, to make it work on Windows
      add a news item
      add a news item
      add a global option to keep the intermediate .md file after converting it to .html
      CRAN release v0.24
@PythonCoderUnicorn
Copy link

PythonCoderUnicorn commented Jun 26, 2021

Hello, I have this issue, I will try to give as much detail to help.

  • device: Mac, 10.15.7, running Rstudio.

R history :

install.packages('flexdashboard')
install.packages('shiny')
install.packages("remotes")
remotes::install_github("rstudio/bslib")
library(ggplot2)
renderPlot({
ggplot(mpg, aes(displ, hwy)) +
geom_point() + geom_smooth()
})
?renderPlot
??renderPlot
library(shiny)
renderPlot({
plot(pressure, col = thematic::thematic_get_option("accent"))
})
library(flexdashboard)
install.packages('flexdashboard')
library(flexdashboard)
library(flexdashboard)
install.packages('markdown')
library(flexdashboard)
install.packages("rlang")
install.packages("rlang")
install.packages("rlang")
install.packages("rlang")
install.packages("rlang")
library(flexdashboard)
install.packages("rlang")
install.packages("rlang")
install.packages("rlang")
install.packages("rlang")
install.packages("rlang")
install.packages("rlang")
install.packages("rlang")
install.packages("rlang")
library(flexdashboard)
library(rlang)
sessionInfo()
remove.packages(rlang)
remove.packages('rlang')
install.packages('rlang')
install.packages("rlang")
library(flexdashboard)
library(rlang)
sessionInfo()
remove.packages("rlang")
library(flexdashboard)
install.packages('rlang 0.4.11.9000')
install.packages('markdown')
install.packages('rlang')
install.packages("rlang")
install.packages("rmarkdown")
knitr::opts_chunk$set(echo = TRUE)
summary(cars)
plot(pressure)
install.packages('knitr')
install.packages("knitr")
install.packages("knitr")
install.packages("knitr")
install.packages("knitr")
install.packages("knitr")
install.packages("knitr")
install.packages("knitr")
install.packages('xfun')
install.packages("xfun")
install.packages("xfun")`

Terminal

> sh: rmarkdown::render: command not found
Warning message:
In system(paste0("rmarkdown::render '", input, "'")) :
  error in running command`
> library(flexdashboard)
  Error: package or namespace load failed forflexdashboardin loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
   namespacerlang0.4.11 is already loaded, but >= 0.4.11.9000 is required`


> install.packages('markdown')
  trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.0/markdown_1.1.tgz'
  Content type 'application/x-gzip' length 198809 bytes (194 KB)
  ==================================================
  downloaded 194 KB


> The downloaded binary packages are in
	/var/folders/1g/ylfgpc813936cj34f1zs1h1h0000gn/T//RtmpdUw2cP/downloaded_packages
> install.packages('rlang')
Error in install.packages : Updating loaded packages

Restarting R session...

> install.packages("rlang")
trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.0/rlang_0.4.11.tgz'
Content type 'application/x-gzip' length 1328785 bytes (1.3 MB)
==================================================
downloaded 1.3 MB


The downloaded binary packages are in
	/var/folders/1g/ylfgpc813936cj34f1zs1h1h0000gn/T//Rtmp10BDdY/downloaded_packages
> install.packages("rmarkdown")
trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.0/rmarkdown_2.9.tgz'
Content type 'application/x-gzip' length 3635877 bytes (3.5 MB)
==================================================
downloaded 3.5 MB


The downloaded binary packages are in
	/var/folders/1g/ylfgpc813936cj34f1zs1h1h0000gn/T//Rtmp10BDdY/downloaded_packages
> knitr::opts_chunk$set(echo = TRUE)
> summary(cars)`

## the cars data loads inside the Rmd file but knit keeps giving errors.  The message box goes into a loop of asking to restart the session, only clicking No does it try to install the package

> `install.packages("knitr")
  trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.0/knitr_1.33.tgz'
  Content type 'application/x-gzip' length 1410317 bytes (1.3 MB)
  ==================================================
  downloaded 1.3 MB


The downloaded binary packages are in
	/var/folders/1g/ylfgpc813936cj34f1zs1h1h0000gn/T//Rtmpix9XqG/downloaded_packages
> install.packages('xfun')
Error in install.packages : Updating loaded packages

Restarting R session...

> install.packages("xfun")
Error in install.packages : Updating loaded packages
> install.packages("xfun")
trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.0/xfun_0.24.tgz'
Content type 'application/x-gzip' length 340207 bytes (332 KB)
==================================================
downloaded 332 KB


> The downloaded binary packages are in
	/var/folders/1g/ylfgpc813936cj34f1zs1h1h0000gn/T//Rtmp3M0ZRX/downloaded_packages`

## and one more time installing/updating rmarkdown
>  `install.packages('rmarkdown')
  trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.0/rmarkdown_2.9.tgz'
  Content type 'application/x-gzip' length 3635877 bytes (3.5 MB)
  ==================================================
  downloaded 3.5 MB


> The downloaded binary packages are in
	/var/folders/1g/ylfgpc813936cj34f1zs1h1h0000gn/T//Rtmp3M0ZRX/downloaded_packages

Hope this helps find the error. I just wanted to try out a flexdashboard with the bslib theme.

I uninstalled, reinstalled rlang just in case that was missed.

@cderv
Copy link
Collaborator

cderv commented Jun 29, 2021

Hi @PythonCoderUnicorn,

Please next time, format your issue correctly so that it is correctly readable (https://docs.github.com/en/github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax). For this time, I edited your post.

The issue is due to a corrupted packages library. In your case it could have been rlang but maybe other. library(rmarkdown) may thrown an error in your case. And the IDE does not handle this well for now (rstudio/rstudio#9435)

Please reinstall rmarkdown correctly.

You can install the last version of xfun and use xfun::broken_packages(reinstall = TRUE) to check for corrupted packages and reinstall them. This could be long as it will test all the installed package. You could just try library(rmarkdown) and follow the error to reinstall the packages with issue.

If library(rmarkdown) is working well, this is something else with the library going on. But as stated above, this is an issue with the IDE and an issue is opened there.

@FrancoisJMalan
Copy link

FrancoisJMalan commented Jun 29, 2021

The same happened to me now as well I get this message:
[1] 127 Warning message: In system(paste0("rmarkdown::render \"", input, "\"")) : 'rmarkdown::render' not found

I have the latest version of RStudio (Version 1.4.1717), reinstalled all the packages etc. The only thing that eventually worked was to reinstall RStudio entirely.

@cderv
Copy link
Collaborator

cderv commented Jun 29, 2021

There is now a fix pushed in RStudio IDE codebase. If everything is ok, it should be available soon in the next daily build of Rstudio.

@PythonCoderUnicorn
Copy link

PythonCoderUnicorn commented Jun 30, 2021

@cderv Thanks,
I ran the xFun line and it said 'pkgs' and 'lib' not found.
I removed /installed rmarkdown. Restared Rstudio after clearing all history.
it works now (knits), even though it defaults to notepad html but easily fixed. Thanks !

netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this issue Aug 17, 2021
# CHANGES IN xfun VERSION 0.25

- Fixed a bug in `broken_packages()` (thanks, @PythonCoderUnicorn,
  rstudio/rmarkdown#1990).

- Added a  `files` argument to  `optipng()` so that users  can specify
  the  list of  PNG  files instead  of running  `optipng`  on a  whole
  directory.

# CHANGES IN xfun VERSION 0.24

- Exported the internal function `broken_packages()` to reinstall
  broken R packages.

- Fixed the bug in `proj_root()` #54 (thanks, @clarkliming).
@Brufico
Copy link

Brufico commented Aug 19, 2021

Hello,
I just had the issue described, after upgrading to the latest version of R and Rstudio

After reading the other comments, when I tried library(rmarkdown), i finally got the error:

Error: le chargement du package ou de l'espace de noms a échoué pour ‘rmarkdown’ : le package ‘evaluate’ a été installé avant R 4.0.0 : veuillez le réinstaller, s'il-vous-plait

I obeyed the message and reinstalled evaluate, then I got many more similar errors like:
Error: le package ‘yaml’ a été installé avant R 4.0.0 : veuillez le réinstaller, s'il-vous-plait

Each time, I reinstalled more packages, and now it works

I have had many of this kind of errors today in R script files, probably because after switching from R 3.something to R 4.1.1, I copied my entire old package library into the new one, and updated. Updating seems not to be enough for R 4.1.1.

It might be the cause for the 'rmarkdown::render not found issue: somewhere along the way, a package cannot be loaded by R and causes the error. the offending package might be anything, and that could be why different people reinstall different packages and still unblock the system.

Could that help?
Best.

@cderv
Copy link
Collaborator

cderv commented Aug 20, 2021

It might be the cause for the 'rmarkdown::render not found issue: somewhere along the way, a package cannot be loaded by R and causes the error. the offending package might be anything, and that could be why different people reinstall different packages and still unblock the system.

Yes I also think this is the case ! Your story complete the one above and confirm this.

As I mentioned in #1990 (comment), it should be fixed in last RStudio version. But we did not had confirmation yet.

And as Yihui mentioned in #1990 (comment), there is a function xfun::broken_packages() that should help to detect and reinstall broken packages as you found. This function could take time to reinstall everything.

For the context, the issue you have while upgrading R is because Packages needs to be rebuild when a Major version of R changes (even when a minor version it could be a good idea).

Thanks for sharing ! That is helpful for us and others !

@alanryder
Copy link

I am an infrequent Markdown user and I have just stumbled across the same issue. I am running R 4.1.1 and RStudio 2021.09.0 build 351 (which I uninstalled and reinstalled). I have updated ALL packages. I ran xfun::broken_packages() and it complained only that the package translations could not be updated. When I Knit a markdown document from the RStudio command line I get a rendered html document. When I execute knitr::knit(markdown_file.Rmd), it knits the file into markdown_file.md. However, when I execute markdown::render(markdown_file.md) I get: Error: 'render' is not an exported object from 'namespace:markdown'.

@cderv
Copy link
Collaborator

cderv commented Oct 12, 2021

However, when I execute markdown::render(markdown_file.md) I get: Error: 'render' is not an exported object from 'namespace:markdown'.

I don't think this is related to this issue. The error you see is saying that the markdown R package (https://github.com/rstudio/markdown) has not render() functions. markdown::render() does not exists. The render() functions for Rmd documents lives in the rmarkdown package (this repo https://github.com/rstudio/rmarkdown)

Please try the correction call rmarkdown::render()

@cderv
Copy link
Collaborator

cderv commented Oct 12, 2021

I'll close this issue because the new release of RStudio IDE contains a fix for this.

Please install newer version of RStudio if you stumble accross this. Version above 20201.09.0+351.

@cderv cderv closed this as completed Oct 12, 2021
@PatrickRWright
Copy link

PatrickRWright commented Jan 27, 2022

FYI I have an internal function xfun:::broken_packages() that I often use by myself to reinstall broken packages (in case xfun is broken itself, first do install.packages('xfun')).

I also had the issue (RStudio Server Version 1.4.1717) and tried loading rmarkdown:

> library(rmarkdown)
Error: package or namespace load failed forrmarkdownin loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
 namespacexfun0.24 is being loaded, but >= 0.27 is required

Updating xfun install.packages("xfun") (currently version 0.29) allowed me to knit again.

@Abdullahi-a-hussein
Copy link

I am getting the same issue. It all started when I tried to install gt package. I reinstalled all the packages. But that did not fix anything. Everything worked after installing fastmap separately and I have no idea why that worked.
Screen Shot 2022-02-05 at 11 05 16 AM

@cderv
Copy link
Collaborator

cderv commented Feb 7, 2022

rmarkdown uses some packages that depends on fastmap

> pak::pkg_deps_explain("rmarkdown", "fastmap")
v Updated metadata database: 3.97 MB in 5 files.                          
v Updating metadata database ... done                                     
rmarkdown -> htmltools -> fastmap                                          
rmarkdown -> jquerylib -> htmltools -> fastmap

So if there was an issue with fastmap installation, then those packages wouldn't load, and rmarkdown etiher.

Anyway, I don't think this was related to this issue here. Glad you found the fix !

@thedivtagguy
Copy link

Can confirm that I too had this error which was fixed after I installed tinytex.
Error:

Warning message: In system(paste0("rmarkdown::render \"", input, "\"")) : 'rmarkdown::render' not found

Details about my setup:

R version 4.0.5 (2021-03-31) -- "Shake and Throw"
Platform: x86_64-w64-mingw32/x64 (64-bit)
RStudio Version 1.4.1106

@Marseillor
Copy link

I also met this issue. It happened when I'm trying to run library(ggplot2) when I had mistakenly uninstalled one of the needed package rlang. After reinstalling that package, the issue was sovled. Hopefully my experience may help.

@hrj21
Copy link

hrj21 commented Dec 20, 2022

Hi all, sorry to revive this from August. I had the same issue today using R 4.1.0 and RStudio 1.4.1717 (I'm on a managed software catalog so cannot update). Neither installing tinytex nor a fresh install of rmarkdown helped, but installing a newer version of xfun solved the issue. I found this out only because I tried "Knit with parameters" and it told me the xfun version wasn't high enough:

Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) : namespace ‘xfun’ 0.30 is being loaded, but >= 0.34 is required

@cderv
Copy link
Collaborator

cderv commented Dec 20, 2022

Thanks for sharing this - I did not know this could be a side effect of this minimum requirement issue.

@github-actions
Copy link

This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug an unexpected problem or unintended behavior RStudio IDE concerns the rstudio ide
Projects
None yet
Development

No branches or pull requests