I am dealing with an issue for several hours, please do not punish me on points. tried pretty much everything was suggested on stack overflow. I use golem library to build up the app, thus please be aware of this aspect. Also, if you want to look on the wider code here is the branch I am working on github:
https://github.com/gabrielburcea/bftb
I put a snippet of the code where the error takes place:
app_server <- function(input, output, session) {
shiny::callModule(mod_tools_server, "tools_path_ui_1")
shiny::callModule(mod_gene_expressions_sign_path_server, "gene_expression_sign_path_ui_1")
shiny::callModule(mod_genomic_server, "genomic_ui_1")
# Your application server logic
}
#' The application User-Interface
#'
#' @param request Internal parameter for `{shiny}`.
#' DO NOT REMOVE.
#' @import shiny
#' @noRd
app_ui <- function(request) {
tagList(
# Leave this function for adding external resources
golem_add_external_resources(),
# Your application UI logic
shinyUI(
navbarPage(
windowTitle = "Page",
title = div(img(src = ".png", height = "30px"), "Toolbox"),
theme = shinythemes::shinytheme("cerulean"),
tabPanel("Toolbox", icon = icon("wrench"),
shinydashboard::dashboardPage(
skin = "black",
header = shinydashboard::dashboardHeader(title = "Toolbox", titleWidth = 300),
shinydashboard::dashboardSidebar(
width = 300 ,
shinydashboard::sidebarMenu(
shinydashboard::menuItem(
"Tools",
tabName = "tools_app",
icon = icon("wrench"),
shinydashboard::menuSubItem(
"Gene Expression/Signature/Pathways",
tabName = "gene_app",
icon = icon("chart-line")
),
shinydashboard::menuSubItem(
"Genomic",
tabName = "genomic_app",
icon = icon("universal-access")
),
)
)
)
),
shinydashboard::dashboardBody(
shinydashboard::tabItems(
shinydashboard::tabItem("tools_app", mod_tools_path_ui("tools_path_ui_1")),
shinydashboard::tabItem("gene_app",mod_gene_expressions_sign_path_ui("gene_expression_sign_path_ui_1")),
shinydashboard::tabItem("genomic_app", mod_genomic_ui("genomic_ui_1"))
}
#' Add external Resources to the Application
#'
#' This function is internally used to add external
#' resources inside the Shiny application.
#'
#' @import shiny
#' @importFrom golem add_resource_path activate_js favicon bundle_resources
#' @noRd
golem_add_external_resources <- function() {
add_resource_path(
"www",
app_sys("app/www")
)
tags$head(
favicon(),
bundle_resources(
path = app_sys("app/www"),
app_title = "bftb"
)
# Add here other external resources
# for example, you can add shinyalert::useShinyalert()
)
}
And I get error such as:
Error: argument "body" is missing, with no default
And with more explanations on the error I get is here:
Error: argument "body" is missing, with no default
Backtrace:
1. bftb::app_ui()
at test-golem-recommended.R:2:2
22. shinydashboard::dashboardPage(...)
23. shinydashboard:::tagAssert(body, type = "div", class = "content-wrapper")