Skip to content

[Bug]: Static assets return 404 when installed via uv on Windows #2235

@kbzsl

Description

@kbzsl

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

  1. Create a new project with uv init
  2. uv add shiny
  3. uv sync
  4. 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"
  1. uv run shiny run app.py
  2. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Priority: HighHigh-confidence regression or severe bug affecting many users or current release work.bugSomething isn't workingneeds-triage

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions