Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to obtain dependencies with renv #951

Closed
ischmidt20 opened this issue Aug 13, 2023 · 3 comments
Closed

Unable to obtain dependencies with renv #951

ischmidt20 opened this issue Aug 13, 2023 · 3 comments

Comments

@ischmidt20
Copy link

I am trying to publish a Shiny application to a Posit Connect server. I am using renv version 1.0.1 for package management, the lockfile looks good, and renv reports that nothing is out of sync. However, whenever I try to publish, I see the following error:

Error in if (pkg$Repository == "CRAN") { : argument is of length zero

I have traced this issue to the call to rsconnect::appDependencies(), as I see the same error when calling that function from the console. Here is the full traceback:

6: FUN(X[[i]], ...)

5: lapply(packages, standardizeRenvPackage, availablePackages = availablePackages,

       biocPackages = biocPackages, repos = repos)

4: standardizeRenvPackages(renv$Packages, repos, biocPackages = biocPackages(bundleDir))

3: parseRenvDependencies(bundleDir)

2: computePackageDependencies(bundleDir, extraPackages, quiet = TRUE)

1: rsconnect::appDependencies()

Any idea what could be causing this, or if there is a workaround? At the moment it is preventing me from publishing my Shiny app.

@aronatkins
Copy link
Contributor

The particular line of code you reference was adjusted in #931

Could you try using the latest development version of rsconnect to see if that helps or produces better feedback?

remotes::install_github("rstudio/rsconnect")

Additionally, any chance that you could create a reprex to help us produce the same error? It would be useful to see your getOption("repos") and how packages were installed.

@ischmidt20
Copy link
Author

ischmidt20 commented Aug 21, 2023

Could you try using the latest development version of rsconnect to see if that helps or produces better feedback?

This worked, thanks!

Packages were installed via the standard install.packages method, with the following repo:

> getOption("repos")
                         CRAN 
"https://cloud.r-project.org"

Upon installing the dev version, rsconnect::appDependencies() now returns the appropriate data frame with Repository equal to "https://cloud.r-project.org" for all packages (with the exception of rsconnect).

@aronatkins
Copy link
Contributor

The version you tested was released to CRAN as rsconnect-1.0.2. Please let us know if you continue to have problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants