Error when saving a table using gt::gtsave()

When I try to save the gt table within RStudio the following error is displayed. I am using the open source version of RStudio Server on WSL.

gt::gtsave(sod_cnflt_gt, filename = "sod_cnflt_gt.png")

google-chrome and chromium-browser were not found. Try setting the CHROMOTE_CHROME environment variable or adding one of these executables to your PATH.
Error in initialize(...) : Invalid path to Chrome

Can anyone guide, how to fix it?

1 Like

After a lot searching I figured that the on WSL Google chrome should be installed. After installing, Google Chrome the problem was fixed.

Following is the code to be run in WSL terminal to install Google Chrome.

# Download Google Chrome

# Install Google Chrome
sudo apt -y install ./google-chrome-stable_current_amd64.deb

# Check successful installation by checking the version of Google Chrome
google-chrome --version

Thereafter, just restart your RStudio project and try the code. Hopefully, it will successfully.

Note: For installing the Google Chrome, I took help from this article by Scott Spense

1 Like

This topic was automatically closed 7 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.