Error publishing to shinyapps.io after rsconnect 1.4.0 update

My app failed to publish to shinyapps.io after updating to rsconnect 1.4.0. Reverting to the earlier version 1.3.4 solved it. Here the fix:

install.packages('https://cran.r-project.org/src/contrib/Archive/rsconnect/rsconnect_1.3.4.tar.gz', repos = NULL, type = 'source')


Referred here by leaflet's GitHub

Appears to be related to a change introduced by rsconnect package:

Deployment to shinyapps.io fails using version 1.4.0 · Issue #1165 · rstudio/rsconnect