Saving Voronoi treemap as high resolution JPG or PNG image in R

That message is because you are probably using install.packages("webshot2") and webshot2 is not yet on CRAN.
its on https://github.com/rstudio/webshot2
Hence why I shared the install code using my favoured package manager ("renv" ) . renv is on CRAN so you could install that first and go from there.
if you have remotes package you could also do remotes::install_github("rstudio/webshot2") but I prefer renv.