We are suddenly having problems with apps using modules that are stored in the 'R' subdirectory. These are not being sourced at launch, it needs to be forced. The following app does not now work unless lines 3 & 4 are uncommented. We are using shiny 1.7.1 and R 4.1.2. Any advice please?
Ah, I see, I wasn't aware of this behavior.
Ok, so I tested it in shiny v1.5.0 with a minimal app and it worked . Namely, I placed a module file test-module.R in app/R/, while my app file is living in app/.
So, again 2 things come to mind in your example:
there might be an issue with relative paths (check whether you have the same structure as I used in my test)
you have no way to check whether your module is being sourced since you are not using it in your app (as I pointed out in my previous comment).
For the second issue, try adding a function in your module script that prints sth to console, and add a call to this function in your app server.
HTH
This post was published by an Appsilon team member. Our company can help you get the most out of RShiny and Posit/RStudio products.