Failing to deploy a Shiny app to RSConnect because it "could not find function %>%"

Hello all,

I have developed a Shiny app that i would like deployed on our RSconnect server. I am taking advantage of RSconnect's "git-backed deployment" feature, pushed my code to our internal GitLab repo, and set up RSconnect to look at that repo. Before pushing my code, I made sure to create the manifest.json file using rsconnect::writeManifest(). Now, I am seeing this error:


The magrittr package is listed in the manifest.json file, so I am not sure why RSconnect does not know where to find it.

How can i fix this?

Ensure you are explicitly calling library(magrittr) in your code. Though it's in the manifest, if it isn't brought in by your code, %>% won't be found.

Thanks @katie ! This helped me diagnose the problem. I was unaware that if I library("a_package") in my main server function, that package doesn't propagate down into modules, so I just had to copy/paste my library() calls into each of my module files. This is definitely not best practice, as I should probably use roxygen2 and the @importFrom [package] [package-functions] line.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.