REditorSupport / REditorSupport/vscode-R

Cannot render .rmd missing pandoc

Open
#969 20 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
1.2k
Forks
139
Avg merge
2h 46m
Merged PRs (30d)
5

Description

Describe the bug
I'm trying to render a simple .Rmd file in VSCode but it keeps telling me
Error: pandoc version 1.12.3 or higher is required and was not found (see the help page ?rmarkdown::pandoc_available).

To Reproduce
For testing purposes I tried to render a markdown with only one cell

1+1

with the same result.
When I try to render the same Markdown in RStudio it works without problems. Pandoc is installed under /usr/local/bin/pandoc and executing pandoc -v shows the correct version. When I open a radian shell in VSCode and type rmarkdown::pandoc_version() it also shows the correct version.
The command that VSCode executes it
rmarkdown::render('[path to file]/Chap04.Rmd', encoding = 'UTF-8')

Expected behavior
VSCode should render the markdown just as RStudio does.

Environment (please complete the following information):

  • OS: macOS
  • VSCode Version: 1.64.0
  • R Version: 4.1.2
  • vscode-R version: 2.3.6
  • pandoc version: 2.17.1.1

Additional context
I tried the various other solutions to this problem such as setting the RSTUDIO_PANDOC variable but without any luck.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No repository file or test is named. First reproduce the failure with the reported rmarkdown::render command, compare it with rmarkdown::pandoc_version(), and trace the vscode-R rendering entry point. Done means rendering the same .Rmd succeeds in VSCode with the installed Pandoc version.

Written by the indexing model from the issue text.

Assessment

Tech stack
r, typescript, vscode
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.