Hello, I'm a new member to this community and relatively new to Shiny and building packages. Following Hadley Wickham's advice in Chapter 20 of Mastering Shiny (Chapter 20 Packages | Mastering Shiny), I have converted an existing app to a package, but I ran into the same problem with the resources in the www/ folder not loading noted in this topic:
Shiny app as a package - directory structure and www folder - shiny - RStudio Community
I ended up following the advice of @cnbrownlie which worked great running the app locally.
Now I am struggling to publish the app in this new layout to Posit Connect using rsconnect::deployApp()
it returns an error due to invalid project layout.
Error in lint(appDir, appFiles, appPrimaryDoc) :
Cancelling deployment: invalid project layout.
The project should have one of the following layouts:
1. 'server.R' and 'ui.R' in the application base directory,
2. 'server.R' and 'www/index.html' in the application base directory,
3. 'app.R' or a single-file Shiny .R file,
4. An R Markdown (.Rmd) or Quarto (.qmd) document,
5. A static HTML (.html) or PDF (.pdf) document.
6. 'plumber.R' API description .R file
7. 'entrypoint.R' plumber startup script
8. A tensorflow saved model
The file structure is as follows:
├── R/
├── run_app.R
├── inst/
├── app/
├── app.R
├── www/
├── DESCRIPTION
Is there a way to deploy an app-package laid out this way? Or do I need to change my layout and handle the www/ folder issue differently?