posit-dev / posit-dev/py-shiny
[Bug]: Static assets return 404 when installed via uv on Windows
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.8k
- Forks
- 135
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 21
Description
Component
Server (server.*)
Severity
P2 - Medium (workaround exists)
Shiny Version
1.6.1
Python Version
3.12.11 and 3.13.5
Minimal Reproducible Example
from shiny.express import input, render, ui
ui.page_opts(title="Test")
with ui.sidebar():
ui.input_action_button("btn", "Click me")
@render.text
def result():
return f"Clicked {input.btn()} times"
Behavior
Description
When shiny is installed via uv (default settings) on Windows, all static assets (/lib/bootstrap-5.3.1/..., /lib/shiny-1.6.1/shiny.js, etc.) return 404. The HTML page renders but has no CSS, no JavaScript, and no interactivity.
Steps to Reproduce
- Create a new project with
uv init uv add shinyuv sync- Create a minimal Shiny Express app:
from shiny.express import input, render, ui
ui.page_opts(title="Test")
with ui.sidebar():
ui.input_action_button("btn", "Click me")
@render.text
def result():
return f"Clicked {input.btn()} times"
uv run shiny run app.py- Open
http://127.0.0.1:8000— page has no styling, button doesn't work
Expected Behavior
Static assets load correctly and the app is fully interactive.
Workaround
Add to pyproject.toml:
[tool.uv]
link-mode = "copy"
Then run:
uv sync --reinstall
Error Messages (if any)
PS > uv run shiny run .\app.py
INFO: Started server process [29932]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
INFO: 127.0.0.1:50477 - "GET / HTTP/1.1" 200 OK
INFO: 127.0.0.1:50477 - "GET /lib/requirejs-2.3.6/require.min.js HTTP/1.1" 404 Not Found
INFO: 127.0.0.1:57875 - "GET /lib/jquery-3.6.0/jquery-3.6.0.min.js HTTP/1.1" 404 Not Found
INFO: 127.0.0.1:56154 - "GET /lib/shiny-1.6.1/shiny.js HTTP/1.1" 404 Not Found
INFO: 127.0.0.1:60520 - "GET /lib/shiny-busy-indicators-1.6.1/busy-indicators.css HTTP/1.1" 404 Not Found
INFO: 127.0.0.1:60632 - "GET /lib/bootstrap-5.3.1/bootstrap.min.css HTTP/1.1" 404 Not Found
INFO: 127.0.0.1:62991 - "GET /lib/bootstrap-5.3.1/bootstrap.bundle.min.js HTTP/1.1" 404 Not Found
INFO: 127.0.0.1:50477 - "GET /lib/htmltools-fill-0.5.9.9000/fill.css HTTP/1.1" 404 Not Found
INFO: 127.0.0.1:57875 - "GET /lib/bslib-components-0.10.0.9000/components.min.js HTTP/1.1" 404 Not Found
INFO: 127.0.0.1:56154 - "GET /lib/bslib-components-0.10.0.9000/web-components.min.js HTTP/1.1" 404 Not Found
INFO: 127.0.0.1:60520 - "GET /lib/ionrangeslider-2.3.1/js/ion.rangeSlider.min.js HTTP/1.1" 404 Not Found
INFO: 127.0.0.1:60632 - "GET /lib/strftime-0.9.2/strftime-min.js HTTP/1.1" 404 Not Found
INFO: 127.0.0.1:62991 - "GET /lib/bootstrap-datepicker-1.9.0/js/bootstrap-datepicker.min.js HTTP/1.1" 404 Not Found
INFO: 127.0.0.1:50477 - "GET /lib/selectize-0.12.6/js/selectize.min.js HTTP/1.1" 404 Not Found
INFO: 127.0.0.1:57875 - "GET /lib/selectize-0.12.6/accessibility/js/selectize-plugin-a11y.min.js HTTP/1.1" 404 Not Found
INFO: 127.0.0.1:57875 - "GET /favicon.ico HTTP/1.1" 404 Not Found
Environment
- OS: Windows 11
- Python: 3.12.11 and 3.13.5
- shiny: 1.6.1
- starlette: 1.0.0
- uv: 0.11.11
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with the minimal app.py example using uv on Windows, then inspect the server.* component that serves the /lib/ static asset paths. Verify the behavior with the listed asset requests and compare it with installation using the link-mode workaround. Done means the assets return successfully and the app's styling and interactivity work without that workaround.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100