renderthis
renderthis copied to clipboard
`assert_chrome_installed()` could give better advice
As pointed out by @yyzeng in this comment
The underlied
chromote::find_chrome()
just CAN'T find chrome.exe's path in my computer, but I have checked and found the path is in the Register with key"HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\chrome.exe\\"
, 😭 So, I have to setSys.setenv("CHROMOTE_CHROME" = "C:\\Users\\admin\\AppData\\Local\\Google\\Chrome\\Application\\chrome.exe")
before usingxaringanBuilder::build_pdf("Test.Rmd")
, then everything is ok.)
we could add some advice about setting the CHROMOTE_CHROME
env variable if Chrome is installed but not found by chromote::find_chrome()
. I guess this is something that should be handled by chromote::find_chrome()
, but we use our own error message since the underlying error isn't very user friendly.
Our current error message reads
Error: This function requires a local installation of the Chrome browser.
You can also use other browsers based on Chromium, such as Chromium itself,
Edge, Vivaldi, Brave, or Opera.
e.g. #39