Document depends on package "gsubfn" but it is not installed

I just tried to publish a flexdashboard app and got errors about some core packages not installed:

Preparing to deploy document...DONE
Uploading bundle for document: 460573...Error:

  • Document depends on package "gsubfn" but it is not installed. Please
    resolve before continuing.

  • Document depends on package "proto" but it is not installed. Please
    resolve before continuing.
    In addition: Warning messages:
    1: In FUN(X[[i]], ...) :
    Failed to infer source for package 'gsubfn'; using latest available version on CRAN instead
    2: In FUN(X[[i]], ...) :
    Failed to infer source for package 'proto'; using latest available version on CRAN instead
    3: In FUN(X[[i]], ...) :
    Failed to infer source for package 'proto'; using latest available version on CRAN instead
    4: Unable to package DESCRIPTION files: Couldn't find DESCRIPTION file for gsubfn
    Execution halted

What's going on, here?

This error may occur if you do not have those :package: installed. During deployment, packrat mechanism checks what you have installed locally to reproduce on the servers. Can you verify that they are installed correctly ?

2 Likes

You also may need to library(gsubfn) and library(proto) in order for packrat to realize that you not only have these installed but are also depending on them. This can happen if packages you directly depend on only have "Suggests" relationships with other packages; the latter may not be picked up.

1 Like

Thanks guys!
I've never heard of those libraries but including them in the source did allow the project to deploy.

Now I've got "Error: An error occurred. Check your logs or contact the app author for clarification", but that's obviously a different issue.

If your question's been answered (even by you!), would you mind choosing a solution? It helps other people see which questions still need help, or find solutions if they have similar problems. Here’s how to do it: