I recently had this on Mac where the version of R was a few steps behind the current on. Updating R to the latest version seemed to solve it.