Can't render quarto document

I can't render quarto documents when there are code chunks, text only works fine.
The only messages I can see in the terminal says "to check environment configurations" but I can't figure out which environment configurations that needs to be checked.

Background: I'm using a windows computer and have R installed in the C directory.

Any help would be greatly appreciated :slight_smile:

This is what comes upp in the terminal when hit the render button in RStudio


==> quarto preview test.qmd --to html --no-watch-inputs --no-browse

processing file: test.qmd

output file: test.knit.md

Problem with running R found at C:\R\R_4-4-2_ny\R-4.4.2\bin\x64\Rscript.exe to check environment configurations.
Please check your installation of R.


When I run "quarto check" in the terminal everything looks fine with the exception "However, a problem was encountered when checking configurations of packages. Please check your installation of R."
I do not know what to check.

Thanks in advance!
Kind regards,
Andrés