HTML not rendering in the RMD file if the directory name is too big.

Greetings, and apologies as I'm new to R.

I think I may have found a potential bug. I'm receiving an issue rendering HTML in a RMD file when the directory name is too big.

I made the directory name in my test case the largest possible for windows. For now we can work around this and tell users to adjust if their directory name if it is too long, although it would be nice to maintain the large directory names.

Thank you in advance!


Can you share more about the error you get ? And also the test case you've made ?

This will help us reproduce and look into this. For now, we don't really where to look ? (RStudio IDE issue ? R Markdown issue ? Shiny issue ? ...)


Thank you for responding!

To replicate Issue:

  1. Create a directory with a large name, such as: "012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
  2. Create a project in that directory.
  3. Create a new RNotebook and save the RMD file.
  4. Put shiny::HTML("<b>Hello World</b>") in the code chunk.
  • The HTML will not render successfully, and it'll show raw HTML.
  • If you do those steps over again without putting the project in a directory with a large name, the HTML will render successfully.

Unfortunately, I did the step mentioned but I can't reproduce.

What I now of Windows, is that there is a limit in path longer you can have. Maximum Path Length Limitation - Win32 apps | Microsoft Learn
I have encounter such limitation in the past but not with rendering Rmd.

What is the error you get exactly ? No error but unexpected content as you described ?
shiny::HTML("<b>Hello World</b>") is including some raw HTML so I am trying to be sure I understood correctly.

Okay, well thank you for looking into it!

Regarding your questions, it does not produce an error message, but it also doesn't produce the expected output when you run the code chunk. The expected output should be rendered HTML with only the text "Hello World" in bold without the html tags "(<'b'>)".

I'll investigate further to see if it's an issue with our machines!

Oh so you mean when you open the HTML document in browser and not what is inside the HTML document ? Can you share the HTML code inside the HTML document for what you see ?

Or are you talking of what you see inside the IDE notebook mode ?

Yes, inside the RNotebook, when you run a code chunk that returns HTML, we expect that to show the rendered HTML within the IDE.

Screenshot with issue:

Screenshot of what we expected/want:

Oh ok. So this is an IDE issue. I’ll move the category.
I don’t know what limitations there could be.

If not done already, Best for your would be to try to update to last daily version in case this is fixed somehow.

Looking in rstudio ide GitHub repo for possible open issue on this is also an option.

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.