Troubleshooting guide
Fix "No supported JavaScript runtime" in Docker
Your python:3.12-slim image ran yt-dlp fine for months. Now YouTube downloads come back with a warning about a missing JavaScript runtime and only low-quality or audio-only formats. Nothing in your Dockerfile changed — yt-dlp did.
The exact warning
WARNING: [youtube] No supported JavaScript runtime could be found.
Only deno is enabled by default; to use another runtime add
--js-runtimes RUNTIME[:PATH] to your command/config. YouTube
extraction without a JS runtime has been deprecated, and some
formats may be missing.YouTube now ships JavaScript challenges that yt-dlp has to execute to unlock the full format list (this is the same machinery behind nsig/signature handling). To run that JavaScript, yt-dlp needs a real JS engine. On a developer laptop you usually already have one; a minimal container image has nothing, so yt-dlp falls back to a reduced set of clients and quietly drops the higher-quality formats.
Which runtimes yt-dlp accepts
yt-dlp detects four engines: Deno (enabled by default), Node, Bun, and a bundled quickjs. You can see what it found with -v:
yt-dlp -v --simulate "https://www.youtube.com/watch?v=jNQXAC9IVRw" 2>&1 | grep -i runtime
# [debug] JS runtimes: deno-2.9.8
# [debug] [youtube] [jsc] JS Challenge Providers: bun (unavailable), deno, node (unavailable), quickjs (unavailable)If that first line is empty or lists every provider as (unavailable), your container has no runtime. Deno is the one yt-dlp enables automatically, so installing Deno is the least-config fix.
Fix 1: add Deno to the image (recommended)
Copy the Deno binary straight from the official image — no install script, no extra layers to keep fresh:
FROM python:3.12-slim
# Deno binary from the official image; yt-dlp enables deno by default
COPY --from=denoland/deno:bin /deno /usr/local/bin/deno
RUN apt-get update && apt-get install -y --no-install-recommends ffmpeg \
&& rm -rf /var/lib/apt/lists/*
RUN pip install --no-cache-dir -U yt-dlp
WORKDIR /downloads
ENTRYPOINT ["yt-dlp"]Because Deno is on PATH, yt-dlp picks it up with no extra flags. Rebuild the image on a schedule so both yt-dlp and the runtime stay current — a stale image is the most common reason server-side yt-dlp "suddenly" breaks.
Fix 2: already have Node? Point yt-dlp at it
If your image is Node-based (or already installs Node), you don't need Deno. Enable the Node provider explicitly:
yt-dlp --js-runtimes node "URL"
# or pin the path if node isn't on PATH:
yt-dlp --js-runtimes node:/usr/bin/node "URL"The same pattern works for bun. Put the flag in a config file so every invocation picks it up instead of repeating it.
Verify the fix
After rebuilding, confirm a runtime is detected and the challenge actually solves:
yt-dlp -v --simulate "https://www.youtube.com/watch?v=jNQXAC9IVRw" 2>&1 | grep -i jsc
# [youtube] [jsc:deno] Solving JS challenges using denoA Solving JS challenges line and the full format list from -Fmeans it's working.
Still 403 after adding a runtime?
A JS runtime fixes the missing formats warning. It does not fix an IP that YouTube has flagged — a common trap is adding Deno, seeing the warning disappear, and still getting HTTP Error 403 on a datacenter host. That's a separate problem; see yt-dlp works locally but not on my server.
If it keeps breaking
Tired of fixing this every time a site changes?
Paste a link to see what a managed import API returns — the one that stays current so your workflow doesn't break.