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
This error may occur if you do not have those installed. During deployment, packrat mechanism checks what you have installed locally to reproduce on the servers. Can you verify that they are installed correctly ?
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.
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: