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