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

assert_chrome_installed() could give better advice #36

Open
gadenbuie opened this issue Sep 17, 2021 · 1 comment
Open

assert_chrome_installed() could give better advice #36

gadenbuie opened this issue Sep 17, 2021 · 1 comment

Comments

@gadenbuie
Copy link
Collaborator

gadenbuie commented Sep 17, 2021

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 set Sys.setenv("CHROMOTE_CHROME" = "C:\\Users\\admin\\AppData\\Local\\Google\\Chrome\\Application\\chrome.exe") before using xaringanBuilder::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.
@gadenbuie
Copy link
Collaborator Author

e.g. #39

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant