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

Can't get js files in docs/presentations/index.qmd to work #1320

Closed
burgerga opened this issue May 18, 2022 · 6 comments
Closed

Can't get js files in docs/presentations/index.qmd to work #1320

burgerga opened this issue May 18, 2022 · 6 comments
Assignees
Labels
bug Something isn't working ojs-engine Issues with the ojs engine
Milestone

Comments

@burgerga
Copy link

Downloading the repo and rendering docs/presentations/index.qmd results in:
image
with in the console:

quarto-ojs-runtime.js:18714 TypeError: Failed to resolve module specifier '....docspresentations
evealjsdemo/./actors.js'
    at Interpreter.resolveImportPath (quarto-ojs-runtime.js:18709:19)
    at Interpreter.cell (quarto-ojs-runtime.js:11864:38)
    at Interpreter.module (quarto-ojs-runtime.js:11838:31)
    at runCell (quarto-ojs-runtime.js:19428:40)
    at Array.map (<anonymous>)
    at QuartoOJSConnector.interpretWithRunner (quarto-ojs-runtime.js:18901:52)
    at QuartoOJSConnector.interpret (quarto-ojs-runtime.js:19435:17)
    at Object.interpret (quarto-ojs-runtime.js:19670:27)
    at Object.interpretFromScriptTags (quarto-ojs-runtime.js:19715:20)
    at VM52 title-slide:1705:25
(anonymous) @ quarto-ojs-runtime.js:18714

so somehow the importpath seems to get mangled?

@dragonstyle dragonstyle transferred this issue from quarto-dev/quarto-web Jul 7, 2022
@jjallaire jjallaire added this to the Future milestone Jul 8, 2022
@cscheid cscheid added bug Something isn't working ojs-engine Issues with the ojs engine labels Aug 1, 2022
@cscheid
Copy link
Collaborator

cscheid commented Aug 5, 2022

@burgerga Can you provide us with the information from our github issue template in order for us to track this down more specifically?

@burgerga
Copy link
Author

burgerga commented Aug 6, 2022

Yes, of course!

Steps to reproduce:

  • I pulled the last changes from Github (quarto-dev/quarto-web@d172e57) and update quarto-cli
  • Did renv::restore() (also happens when not restoring renv by the way)
  • Open docs/presentations/revealjs/demo/index.qmd
  • Click Render

Output background job:

processing file: index.qmd
  |....                                                                  |   6%
  ordinary text without R code

  |........                                                              |  12%
label: unnamed-chunk-1 (with options) 
List of 3
 $ echo      : logi TRUE
 $ fig.width : int 10
 $ fig.height: num 4.5

  |............                                                          |  18%
  ordinary text without R code

  |................                                                      |  24%
label: unnamed-chunk-2
  |.....................                                                 |  29%
  ordinary text without R code

  |.........................                                             |  35%
label: unnamed-chunk-3
  |.............................                                         |  41%
  ordinary text without R code

  |.................................                                     |  47%
label: unnamed-chunk-4
  |.....................................                                 |  53%
  ordinary text without R code

  |.........................................                             |  59%
label: unnamed-chunk-5 (with options) 
List of 2
 $ echo      : logi FALSE
 $ fig.height: int 5

  |.............................................                         |  65%
  ordinary text without R code

  |.................................................                     |  71%
label: unnamed-chunk-6
  |......................................................                |  76%
  ordinary text without R code

  |..........................................................            |  82%
label: unnamed-chunk-7 (with options) 
List of 1
 $ engine: chr "ojs"

  |..............................................................        |  88%
  ordinary text without R code

  |..................................................................    |  94%
label: unnamed-chunk-8 (with options) 
List of 1
 $ engine: chr "ojs"

  |......................................................................| 100%
  ordinary text without R code


output file: index.knit.md

Warning message:
package 'ggplot2' was built under R version 4.2.1 
pandoc 
  to: revealjs
  output-file: index.html
  standalone: true
  title-prefix: Quarto
  wrap: none
  default-image-extension: png
  html-math-method:
    method: mathjax
    url: >-
      https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS_HTML-full
  slide-level: 2
  css:
    - styles.css
  
metadata
  link-citations: true
  width: 1050
  height: 700
  margin: 0.1
  center: false
  navigationMode: linear
  controlsLayout: edges
  controlsTutorial: false
  hash: true
  history: true
  hashOneBasedIndex: false
  fragmentInURL: false
  transition: none
  backgroundTransition: none
  pdfSeparateFragments: false
  lang: en
  auto-stretch: true
  bibliography:
    - ../../../../references.bib
  editor: visual
  title: Quarto Presentations
  subtitle: Create beautiful interactive slide decks with Reveal.js
  resources:
    - demo.pdf
  slideNumber: true
  chalkboard:
    buttons: false
  previewLinks: auto
  logo: images/quarto.png
  footer: '<https://quarto.org>'
  
Output created: ..\..\..\..\_site\docs\presentations\revealjs\demo\index.html

Watching files for changes
Browse at http://localhost:3654/docs/presentations/revealjs/demo/index.html

Screenshot

So behavior has changed a bit, there is no more error in the console, but now the error displays directly in the browser (also note the missing 'r' in 'evealjsdemo', a clue?):

image

quarto check Output:

[>] Checking Quarto installation......OK
      Version: 1.0.38
      Path: C:\Users\burge\AppData\Local\Programs\Quarto\bin\
      CodePage: 65001

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

[>] Checking Python 3 installation....OK
      Version: 3.9.7
      Path: C:/Users/burge/GitHub/quarto-web/renv/python/virtualenvs/renv-python-3.9/Scripts/python.exe
      Jupyter: 4.7.1
      Kernels: python3

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

[>] Checking R installation...........OK
      Version: 4.2.0
      Path: C:/PROGRA~1/R/R-42~1.0
      LibPaths:
        - C:/Users/burge/GitHub/quarto-web/renv/library/R-4.2/x86_64-w64-mingw32
        - C:/Users/burge/AppData/Local/Temp/RtmpKGYcw4/renv-system-library
      rmarkdown: 2.14

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

quarto tools check Output:

[>] Inspecting tools

Tool         Status                    Installed     Latest
chromium     Not installed             ---           869685
tinytex      External Installation     ---           v2022.08

Other stuff

  • RStudio version: 2022.07.1 Build 554
  • Running on Windows 11

@burgerga
Copy link
Author

burgerga commented Aug 6, 2022

So it looks like the path is somehow parsed and /r is replaced with a carriage return? (see also the newline in the console output in my top post)

@cscheid
Copy link
Collaborator

cscheid commented Aug 6, 2022

I think we fixed this recently: #1605 Can you try the pre-release quarto 1.1 release? https://github.com/quarto-dev/quarto-cli/releases/tag/v1.1.48

@burgerga
Copy link
Author

burgerga commented Aug 6, 2022

Do you know what the latest prerelease version is that does not have the mentioned issue?

@burgerga
Copy link
Author

burgerga commented Aug 6, 2022

Yes, v1.1.49 works like a charm, thanks!

@burgerga burgerga closed this as completed Aug 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ojs-engine Issues with the ojs engine
Projects
None yet
Development

No branches or pull requests

3 participants