Welcome to the forum.
We may need a reproducible example (reprex)
but at a guess you need to install the R6 package
install.packages("R6")
and then try again.
Good luck.