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

Quarto CLI not available #120

Closed
Robinlovelace opened this issue Dec 18, 2024 · 9 comments
Closed

Quarto CLI not available #120

Robinlovelace opened this issue Dec 18, 2024 · 9 comments

Comments

@Robinlovelace
Copy link
Contributor

I've tried multiple times to get my pkgdown site built using pkgdown but to no avail: every time I've tried in the last few days it's failed with the following error message:

Error running quarto cli

And

Error in `quarto::quarto_render()`:
✖ Error running quarto cli.
ℹ Rerun with `quiet = FALSE` to see the full error message.
Caused by error:
! System command 'quarto' failed

Source: https://github.com/acteng/netgen/actions/runs/12387364651/job/34576697088#step:7:84

I've checked and double checked my pkgdown.yml workflow file and even tried things like changing the OS version and quarto version installed, but nothing works. I've tried forking the quarto-r repo to reproduce the issue, as I'm using the same pkgdown.yml file as there, but the workflow is not being triggered for some reason.

Am I missing something? I'm sure Quarto is available but seems R cannot see it, is that a correct diagnosis?

Thanks,

Robin

Robinlovelace added a commit to acteng/netgen that referenced this issue Dec 18, 2024
@Robinlovelace
Copy link
Contributor Author

Note: I can reproduce this locally so imagine it's something wrong with my config, maybe .Rbuildignore contents.

@cderv
Copy link
Collaborator

cderv commented Dec 18, 2024

I don't think it is unavailable. Errors says that the quarto command fails. So something is failing when running quarto render.

I don't think this is related to the quarto action. I think this is coming from pkgdown itself.

It may be related to this

And I am thinking maybe this is related to this issue

Though for the latter, a workaround is to make sure to install the package using local::. in extra-packages for example, under r-lib/actions/setup-r-dependencies@v2 and you are already doing that.

So could be a pkgdown issue in fact...

@Robinlovelace
Copy link
Contributor Author

Weird in any case... .Rbuildignore could be a culprit do you think?

@cderv
Copy link
Collaborator

cderv commented Dec 19, 2024

I am not sure. I wonder if this is a problem of configuration with quarto_render() that run quarto render in a new R background R process, and somehow the libpath is not having the package.

In any case, pkgdown is hiding the real error. So we would need to reproduce locally with full quarto error to be sure the problem is what I think it is: the vignette is using the package and somehow it is not available to quarto process.

I can reproduce this locally so imagine it's something wrong with my config, maybe .Rbuildignore contents.

I'll see if I can look into that with your project. Maybe pkgdown has an opt-in to be more verbose on the error.

@Robinlovelace
Copy link
Contributor Author

Should we migrate this issue to pkgdown? Seems likely the best place.

@cderv
Copy link
Collaborator

cderv commented Dec 19, 2024

Should we migrate this issue to pkgdown? Seems likely the best place.

I do think this is the same as r-lib/pkgdown#2830 so we would need to confirm if this is the same or not.

@Robinlovelace
Copy link
Contributor Author

Closing for now, it remains a mystery, but don't see anything that can be done in the quarto-actions codebase to fix it.

@cderv
Copy link
Collaborator

cderv commented Dec 19, 2024

This is the error

processing file: schoolroutes.qmd
1/87                                 
2/87 [unnamed-chunk-1]               
3/87                                 
4/87 [unnamed-chunk-2]               
5/87                                 
6/87 [setup]                         
Error in `library()`:
! there is no package called 'netgen'
Backtrace:
  1. global .main()
  2. execute(...)
  3. rmarkdown::render(...)
  4. knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
  5. knitr:::process_file(text, output)
     ...
 16. base::withRestarts(...)
 17. base (local) withRestartList(expr, restarts)
 18. base (local) withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]])
 19. base (local) docall(restart$handler, restartArgs)
 21. evaluate (local) fun(base::quote(`<pckgNtFE>`))



Quitting from lines 62-63 [setup] (schoolroutes.qmd)
Execution halted

So this is indeed related to the way pkgdown install the package in a temp directory, which does not seem to be known by quarto::quarto_render() when running the background process.

@Robinlovelace
Copy link
Contributor Author

OK well spotted.

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