quarto-dev / quarto-cli

Open-source scientific and technical publishing system built on Pandoc.
https://quarto.org
Other
3.97k stars 328 forks source link

Quarto preview command don't show updated version of html document after autoreload #11475

Open skyfroger opened 1 week ago

skyfroger commented 1 week ago

Bug description

I tried to find reasonable explanation for such behaviour. But I can't find the source of this bug. Maybe it specific for my machine. But I don't know how to fix this problem.

I encountered this bug for website projects and standalone qmd files.

Steps to reproduce

Create website project:

quarto create project website mysite

Start website preview:

quarto preview mysite

Edit file index.qmd inside project folder and save changes.

Edit file about.qmd inside project folder and save changes.

Expected behavior

After saving changes to the qmd files browser reloads page and show updated html.

Actual behavior

Content of index.html page updated after saving changes to index.qmd file and browser page autoreloads. Content of about.html page stays the same after saving changes to about.qmd file and browser page autoreloads. But if I restart quarto preview command, I am seeing changes made to the about.qmd file.

Your environment

Quarto check output

Quarto 1.6.36
[>] Checking environment information...
      Quarto cache location: C:\Users\skyfr\AppData\Local\quarto
[>] Checking versions of quarto binary dependencies...
      Pandoc version 3.4.0: OK
      Dart Sass version 1.70.0: OK
      Deno version 1.46.3: OK
      Typst version 0.11.0: OK
[>] Checking versions of quarto dependencies......OK
[>] Checking Quarto installation......OK
      Version: 1.6.36
      Path: C:\Program Files\Quarto\bin
      CodePage: 1251

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

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

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

[>] Checking Python 3 installation....OK
      Version: 3.11.5
      Path: C:/Program Files/Python311/python.exe
      Jupyter: (None)

      Jupyter is not available in this Python installation.
      Install with py -m pip install jupyter

[>] Checking R installation...........OK
      Version: 4.4.1
      Path: C:/PROGRA~1/R/R-44~1.1
      LibPaths:
        - C:/Users/skyfr/AppData/Local/R/win-library/4.4
        - C:/Program Files/R/R-4.4.1/library
      knitr: (None)
      rmarkdown: (None)

      The knitr package is not available in this R installation.
      Install with install.packages("knitr")
      The rmarkdown package is not available in this R installation.
      Install with install.packages("rmarkdown")
cderv commented 1 week ago

To confirm that I can reproduce. Thanks for reporting.

mcanouil commented 6 days ago

Seems related to:

robertocarvajal commented 4 days ago

yeah, happens for me too.. my solution is any time I want to preview I just run touch _quarto.yml and then the preview session will reload and show the changes, without that it will still reload but not show any changes, I'm also thinking into adding some file watch service and run the touch command for me to automate this until a proper fix reaches a future release.