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

Error: Specifier not found in cache #14

Closed
durraniu opened this issue Nov 3, 2024 · 6 comments
Closed

Error: Specifier not found in cache #14

durraniu opened this issue Nov 3, 2024 · 6 comments

Comments

@durraniu
Copy link

durraniu commented Nov 3, 2024

Thanks for creating this demo. I am on Windows 10. I cloned your repo and tried rendering the index.qmd and R-shinylive-demo.qmd files after installing the shinylive package. But I get the following output with an error. Could you help me finding out what's wrong?

==> quarto preview index.qmd --to html --no-watch-inputs --no-browse

pandoc 
  to: html
  output-file: index.html
  standalone: true
  title-prefix: r-shinylive in Quarto
  section-divs: true
  html-math-method: mathjax
  wrap: none
  default-image-extension: png
  toc: true
  
metadata
  document-css: false
  link-citations: true
  date-format: long
  lang: en
  grid:
    body-width: 1300px
    sidebar-width: 200px
    margin-width: 200px
  title: R-shinylive app in Quarto!
  resources:
    - shinylive-sw.js
  
error: Specifier not found in cache: "https://deno.land/std/io/mod.ts", --cached-only is specified.
    at file:///C:/Users/umair/AppData/Local/shinylive/shinylive/Cache/shinylive-0.5.0/scripts/codeblock-to-json.js:5:27
Error running filter C:/Users/umair/AppData/Local/Apps/Quarto/share/filters/main.lua:
Error running quarto (error code 1): <no output>
stack traceback:
	...live-demo\_extensions\quarto-ext\shinylive\shinylive.lua:417: in function <...live-demo\_extensions\quarto-ext\shinylive\shinylive.lua:398>
	[C]: in ?
	[C]: in method 'walk'
	...s/umair/AppData/Local/Apps/Quarto/share/filters/main.lua:558: in local 'checked_walk'
	...s/umair/AppData/Local/Apps/Quarto/share/filters/main.lua:610: in function 'run_emulated_filter'
	...s/umair/AppData/Local/Apps/Quarto/share/filters/main.lua:1335: in local 'callback'
	[string "..."]:1888: in field 'withScriptFile'
	...s/umair/AppData/Local/Apps/Quarto/share/filters/main.lua:1351: in upvalue 'run_emulated_filter_chain'
	...s/umair/AppData/Local/Apps/Quarto/share/filters/main.lua:1389: in function <...s/umair/AppData/Local/Apps/Quarto/share/filters/main.lua:1386>
stack traceback:
	...s/umair/AppData/Local/Apps/Quarto/share/filters/main.lua:558: in local 'checked_walk'
	...s/umair/AppData/Local/Apps/Quarto/share/filters/main.lua:610: in function 'run_emulated_filter'
	...s/umair/AppData/Local/Apps/Quarto/share/filters/main.lua:1335: in local 'callback'
	[string "..."]:1888: in field 'withScriptFile'
	...s/umair/AppData/Local/Apps/Quarto/share/filters/main.lua:1351: in upvalue 'run_emulated_filter_chain'
	...s/umair/AppData/Local/Apps/Quarto/share/filters/main.lua:1389: in function <...s/umair/AppData/Local/Apps/Quarto/share/filters/main.lua:1386>
@coatless
Copy link
Contributor

coatless commented Nov 3, 2024

I can't reproduce this on my end with material posted as-is in the repository.

Screenshot of the page working fine under local source

I would suggest making sure that you are:

  1. up-to-date with the version of R present
    • This should be R 4.4.1 or R 4.4.2
  2. using the R shinylive package on CRAN.
install.packages("shinylive")
  1. Running Quarto v1.5.57
    • Note: if you have an outdated copy of RStudio, this may be problematic.

In the Terminal tab within RStudio, type:

quarto check

You should get:

Quarto 1.5.57
[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.2.0: OK
      Dart Sass version 1.70.0: OK
      Deno version 1.41.0: OK
      Typst version 0.11.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 1.5.57
      Path: /Applications/quarto/bin
....

@durraniu
Copy link
Author

durraniu commented Nov 3, 2024

My R version is 4.3.2 so that may be the culprit. The remaining requirements are okay, i.e., shinylive is installed and quarto version is 1.6.32.
Thank you for the help. I am closing the issue.

@durraniu durraniu closed this as completed Nov 3, 2024
@coatless
Copy link
Contributor

coatless commented Nov 3, 2024

@durraniu there's a lot of instability in the latest preview release of Quarto (v1.6.32)

quarto-dev/quarto-cli#10951

I would suggest downgrading. The error is suggesting a deno issue, which might have crept back in.

@durraniu
Copy link
Author

durraniu commented Nov 3, 2024

Thanks for pointing that out. I'll try upgrading R and downgrading quarto and report back.

@durraniu
Copy link
Author

durraniu commented Nov 3, 2024

Update: With R 4.4.2 and Quarto 1.5.57, the app works! Thank you.

@coatless
Copy link
Contributor

coatless commented Nov 4, 2024

@durraniu great to hear. FYI, this is a known issue with Quarto v1.6 pre-release due to a change in how deno imports need to occur. Details: https://prerelease.quarto.org/docs/projects/scripts.html#deno-scripts

The issue is already being tracked at the appropriate repository:

quarto-ext/shinylive#65
posit-dev/shinylive#185

The only downside is if you need to use {quarto-shinylive} extension, you can't use it with a pre-release!

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