'data' is not an exported object from 'namespace:my_package'

It could not be the same in every case, but I've solved the problem by removing the data.R file on R/ folder.

data.R is a file describing all data presented in the package. I had it since the previous version of my code, that had the data built in, not remote (to be downloaded). Removing the file solved my problem.

Example of data.R:

#' Name_of_the_data
#'
#' Description_of_the_Data
#'
#' @format A data frame with 10000 rows and 2 variables:
#' \describe{
#'   \item{Col1}{description of Col1}
#'   \item{Col2}{description of Col2}
#' }
"data_name"

No need to remove data.R in /R folder, you just need to decorate the documentation around the NULL keyword as follow:

#' Name_of_the_data
#'
#' Description_of_the_Data
#'
#' @format A data frame with 10000 rows and 2 variables:
#' \describe{
#'   \item{Col1}{description of Col1}
#'   \item{Col2}{description of Col2}
#' }
NULL