Error in deploying application to Shiny: "Error in value[[3L]](cond): there is no package called 'leaflet'

Hello everyone, I am having an issue regarding deployment of a Shiny app. The shiny app.R file works completely fine on my local machine, but when I go to deploy it to my shinyapps.io account, I keep getting this error:

Error in value[[3L]](cond) : there is no package called 'leaflet'
Calls: local ... trycatch -> tryCatchList -> tryCatchOne -> <Anonymous>
Execution halted

This is really strange to me because I have leaflet as one of the libraries used in my Shiny App

library(leaflet)
library(leaflet.extras)
library(dplyr)
library(reshape)
library(reshape2)

Is there something that I am doing wrong or did not include?

Thank you very much in advance.

I have a similar problem. When I try to publish my app in shinyapps.io I get:

Error in value[[3L]](cond) : there is no package called ‘tidyverse’
Calls: local ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>

I'm only need to libraries, but there is no way to get my app working.

library(shiny)
library(tidyverse)

From what I have read it seems to be related with working directory, but I do not know how to fix it, and I am a bit frustrated with this. Any help?