Why does quarto preview
always choose a new port?
#2083
-
When you run the command In my typical workflow, I will be editing my .qmd files with the preview server running. Sometimes the server may crash (for example I switch branches). Then I need to run |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
We do this because we've found in the past that some operating systems sometimes hold ports longer than the process's lifetime, which means that quickly iterating through a number of (I find this behavior not optimal either, but the alternative is worse) |
Beta Was this translation helpful? Give feedback.
-
In my
and this fixes the port to 7777. I had the exact same issue as the OP, and found this workaround in the docs somewhere :) |
Beta Was this translation helpful? Give feedback.
We do this because we've found in the past that some operating systems sometimes hold ports longer than the process's lifetime, which means that quickly iterating through a number of
quarto preview
processes could lead to users having to manually choose different ports anyway.(I find this behavior not optimal either, but the alternative is worse)