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 from new Quarto: Specifier not found in cache #65

Open
kv9898 opened this issue Oct 23, 2024 · 10 comments
Open

error from new Quarto: Specifier not found in cache #65

kv9898 opened this issue Oct 23, 2024 · 10 comments

Comments

@kv9898
Copy link

kv9898 commented Oct 23, 2024

For later versions of Quarto (1.6.19 onwards), I got an error which is not present in early versions (1.6.18 and before):

error: Specifier not found in cache: "https://deno.land/std/io/mod.ts", --cached-only is specified.
    at file:///C:/Users/kv989/AppData/Local/shinylive/shinylive/Cache/shinylive-0.7.0/scripts/codeblock-to-json.js:5:27      
Error running filter D:/quarto/share/filters/main.lua:
Error running D:\quarto\bin\quarto.exe (error code 1): <no output>
stack traceback:
        D:\website\_extensions\quarto-ext\shinylive\shinylive.lua:427: in function <D:\website\_extensions\quarto-ext\shinylive\shinylive.lua:408>
        [C]: in ?
        [C]: in method 'walk'
        D:/quarto/share/filters/main.lua:558: in local 'checked_walk'
        D:/quarto/share/filters/main.lua:610: in function 'run_emulated_filter'
        D:/quarto/share/filters/main.lua:1335: in local 'callback'
        [string "..."]:1888: in field 'withScriptFile'
        D:/quarto/share/filters/main.lua:1351: in upvalue 'run_emulated_filter_chain'
        D:/quarto/share/filters/main.lua:1389: in function <D:/quarto/share/filters/main.lua:1386>
stack traceback:
        D:/quarto/share/filters/main.lua:558: in local 'checked_walk'
        D:/quarto/share/filters/main.lua:610: in function 'run_emulated_filter'
        D:/quarto/share/filters/main.lua:1335: in local 'callback'
        [string "..."]:1888: in field 'withScriptFile'
        D:/quarto/share/filters/main.lua:1351: in upvalue 'run_emulated_filter_chain'
        D:/quarto/share/filters/main.lua:1389: in function <D:/quarto/share/filters/main.lua:1386>

quarto check information with the last working version of Quarto (1.6.18):

Quarto 1.6.18
[>] Checking versions of quarto binary dependencies...
      Pandoc version 3.4.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.6.18
      Path: D:\quarto\bin
      CodePage: 936

[>] Checking tools....................OK
      TinyTeX: v2024.09
      Chromium: (not installed)

[>] Checking LaTeX....................OK
      Using: TinyTex
      Path: C:\Users\kv989\AppData\Roaming\TinyTeX\bin\windows\
      Version: 2024

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

[>] Checking Python 3 installation....OK
      Version: 3.12.4 (Conda)
      Path: D:/Anaconda/python.exe
      Jupyter: 5.7.2
      Kernels: python3

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

[>] Checking R installation...........OK
      Version: 4.4.1
      Path: D:/R-4.4.1
      LibPaths:
        - D:/R-4.4.1/library
      knitr: 1.48
      rmarkdown: 2.28

[>] Checking Knitr engine render......OK
@kv9898 kv9898 changed the title error: Specifier not found in cache error from new Quarto: Specifier not found in cache Oct 24, 2024
@kv9898 kv9898 closed this as completed Oct 24, 2024
@kv9898 kv9898 reopened this Oct 24, 2024
@kv9898
Copy link
Author

kv9898 commented Oct 24, 2024

Note: a Windows laptop is used. The quarto extension and python library of Shinylive are up to date

@kv9898
Copy link
Author

kv9898 commented Oct 24, 2024

The Quarto side suggests Shinylive update its script:
quarto-dev/quarto-cli#11183 (comment)

@cderv
Copy link
Contributor

cderv commented Oct 25, 2024

Quarto 1.6 does have breaking change with quarto run: prerelease doc has the updated information https://prerelease.quarto.org/docs/projects/scripts.html#deno-scripts

@kv9898
Copy link
Author

kv9898 commented Oct 25, 2024

Quarto 1.6 does have breaking change with quarto run: prerelease doc has the updated information https://prerelease.quarto.org/docs/projects/scripts.html#deno-scripts

Thanks for the information. I tried to do a quick fix to bug following the documentation by changing:

import { readLines } from "https://deno.land/std/io/mod.ts";

to:

import { readLines } from "stdlib/io";

and a new error pops up:

error: JSR package version manifest for '@std/[email protected]' failed to load: Specifier not found in cache: "https://jsr.io/@std/io/0.224.9_meta.json", --cached-only is specified.
    at file:///C:/Users/kv989/AppData/Local/shinylive/shinylive/Cache/shinylive-0.7.0/scripts/codeblock-to-json.js:5:27
Error running filter D:/quarto/share/filters/main.lua:

Any ideas?

@cderv
Copy link
Contributor

cderv commented Oct 28, 2024

Something does not seem right... 🤔 I'll dig into that, as I don't think it is related to shinylive.

Edit: It seems we have an issue and this is tracked in

Thanks for reporting !

@kv9898
Copy link
Author

kv9898 commented Oct 28, 2024

Something does not seem right... 🤔 I'll dig into that, as I don't think it is related to shinylive.

Edit: It seems we have an issue and this is tracked in

Thanks for reporting !

Thank you so much for looking into this. Good to know that both projects belong to Posit and we have someone like you who have worked on both projects.

@cderv
Copy link
Contributor

cderv commented Oct 29, 2024

This should be fixed in 1.6.32. You can try again with shinylive and updated scripts.

@kv9898
Copy link
Author

kv9898 commented Oct 29, 2024

It worked! Thank you. Shall I keep this issue open for the Shinylive script to be edited? I'm hesitating to write a PR now as I fear the updated script would break support for Quarto 1.5, which is the current stable release?

@cderv
Copy link
Contributor

cderv commented Oct 29, 2024

I'm hesitating to write a PR now as I fear the updated script would break support for Quarto 1.5, which is the current stable release?

Yes something needs to be done regarding that... maybe it requires two scripts and use the correct one based on quarto version used ?

You could probably open a PR with ideas, otherwise we'll come with a solution soon.

@kv9898
Copy link
Author

kv9898 commented Oct 30, 2024

I'm hesitating to write a PR now as I fear the updated script would break support for Quarto 1.5, which is the current stable release?

Yes something needs to be done regarding that... maybe it requires two scripts and use the correct one based on quarto version used ?

You could probably open a PR with ideas, otherwise we'll come with a solution soon.

It seems that the source is in a different repo: https://github.com/posit-dev/shinylive/blob/6e4933f46048f3b0d1293d31e9525570b0c4ff94/src/scripts/codeblock-to-json.ts

I opened an issue there: posit-dev/shinylive#185

That repo does not seem very active, though. My previous issue posted 1 month ago hasn't got any replies yet.

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