quarto-dev / quarto-dev/quarto-cli

Support code-link option for Shiny document

Open
#9,208 3 comments 0 reactions 1 assignee View on GitHub

@cderv is already working on this.

Since Mar 28, 2024.

enhancement third-party
Dominant language
JavaScript
Stars
6k
Forks
458
Avg merge
1d 9h
Merged PRs (30d)
41

Description

Bug description

When I try to use the code-link option with Shiny in Quarto, I get an uninformative error message.

Steps to reproduce
---
title: "Test"
knitr: true
format:
  html:
    code-link: true
server: shiny
---

Test

Expected behavior

No error, or an informative message stating that code-link is not compatible with Shiny.

Actual behavior
❯ quarto serve test.qmd
Loading required namespace: shiny


processing file: test.qmd
1/1
output file: test.knit.md

pandoc
  to: html
  output-file: test.html
  standalone: true
  section-divs: true
  html-math-method: mathjax
  wrap: none
  default-image-extension: png

metadata
  document-css: false
  link-citations: true
  date-format: long
  lang: en
  title: Test
  knitr: true
  server:
    type: shiny

Error: parse error: unallowed token at this point in JSON text
                                       });
                     (right here) ------^
In addition: Warning message:
In shiny_prerendered_extract_context_serialized(html_lines, "dependencies") :
  Multiple dependencies contexts found in prerendered HTML, using last.
Execution halted
Your environment

macOS 14.4.1
BuildVersion: 23E224

Quarto check output

❯ quarto check
Quarto 1.4.552
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.1.11: OK
Dart Sass version 1.69.5: OK
Deno version 1.37.2: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 1.4.552
Path: /Applications/quarto/bin

[✓] Checking tools....................OK
TinyTeX: (not installed)
Chromium: (not installed)

[✓] Checking LaTeX....................OK
Using: Installation From Path
Path: /Library/TeX/texbin
Version: 2023

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
Version: 3.11.3
Path: /Library/Frameworks/Python.framework/Versions/3.11/bin/python3
Jupyter: 5.3.0
Kernels: ir, julia-1.6, julia-1.8, julia-1.9, juliapro_v1.5.0-1-1.5, julia-1.5, julia-12-threads-1.8, python3

[✓] Checking Jupyter engine render....OK

[✓] Checking R installation...........OK
Version: 4.3.2
Path: /Library/Frameworks/R.framework/Resources
LibPaths:
- /Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library
knitr: 1.45
rmarkdown: 2.26

[✓] Checking Knitr engine render......OK

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.