← Blog

34 of 45 installs failed. Here's what was actually wrong

A week of anonymous CLI telemetry said most remotion-ui add runs were failing. The obvious explanation covered some of it. Replaying every failure in a clean project found two registry bugs that no test had caught.

RemotionUI

RemotionUI 0.11.0 shipped anonymous usage telemetry: one event per command with the command name, the registry components involved, whether it succeeded, and the CLI version. No paths, no project names, nothing from custom registries.

The first week of data had one number that mattered. Of 45 add runs, 34 failed.

A component registry where three out of four installs fail is not a registry. So we spent a day finding out why. This is what we found, including the part where our own debugging harness lied to us.

What the events could and couldn't tell us

The 0.11.0 event had four fields: command, components, ok, cliVersion. That tells you that something failed, and which components were in the run. It does not tell you why.

Read in time order, though, the failures had a shape:

  • The same component failed, then succeeded a few minutes later with nothing else changed. ik-rig failed three times in two minutes, then installed. logo-wall failed and installed 41 seconds later.
  • init failed and then succeeded eight seconds later.
  • Large batches of 14 and 20 components failed as a whole.

A component that is broken stays broken when you retry it. A whole run that fails and then works on retry looks like the environment was wrong, not the component.

Theory one: you're in the wrong folder

The quick start is two commands:

The happy path
npx remotion-ui@latest init my-video npx remotion-ui@latest add social-clip

The step in between, cd my-video, was printed by init but is easy to skip. Run add from the parent folder and the CLI finds no remotion-ui.json. Until 0.11.0, it then said:

0.11.0: technically true, practically wrong
Run "remotion-ui init" first

You already ran init. So you run it again, or you go hunting. That fits the fail, fail, succeed pattern exactly.

0.11.1 fixed the message. When add finds no config, it looks one level down for a folder that has one and names it:

0.11.1
No remotion-ui.json found in /Users/you/projects. Your project is in ./my-video: run "cd my-video" and try again.

With no project below, it explains the difference between init and init --existing. The same release added an errorCode field to failed events: a fixed string like CONFIG_NOT_FOUND, never the error message, so no paths leave your machine. The next time the numbers look bad, the events will say which failure it is.

That was a guess, though, and a guess based on timestamps. Before calling it done we wanted to know whether the wrong folder explained all the failures, or just the ones that happened to look like it.

Replaying every failure

We took every distinct set of components from a failed add and ran it again against the published CLI. Each set got its own copy of a freshly initialised project, so there was no wrong folder to blame. Telemetry was off for the replay.

The first result was alarming: 11 of 23 sets still failed, inside a correct project.

Then we read the logs.

Every failing replay
Component "fade-in typewriter counter lower-third" not found.

That's four component names passed as one argument. Our replay script stored each set as a string and quoted it on the way into the command, so the CLI was asked for a single component whose name had three spaces in it. That was a bug in the harness, not the CLI. With the names split into separate arguments, all 23 sets installed.

Worth saying plainly, because it nearly sent us down the wrong path: when a reproduction disagrees with production, check the reproduction first. Ours was failing for a reason none of our users could ever hit.

So installs worked. But "installed" only means files were written and packages were added. It doesn't mean the project compiles.

The bugs add didn't report

We ran tsc --noEmit in all 23 replay projects. 21 were clean. Two had one error each.

A font package nobody declared

p4: added logo-wall
src/remotion/scenes/logo-wall/index.tsx: error TS2307: Cannot find module '@remotion/google-fonts/Inter'

logo-wall loads Inter through @remotion/google-fonts. Its registry entry declared one npm dependency: remotion. So add copied a file that imported a package it never installed.

It wasn't just logo-wall. We wrote a scan that reads every registry item's source, collects its runtime imports, and compares them with the dependencies declared anywhere in the item's registryDependencies closure, since a dependency declared by a shared helper is installed too. 28 items imported @remotion/google-fonts or @remotion/layout-utils without anything in their closure declaring it: scenes like pricing-card and notification-stack, caption treatments, and both marquees.

Why didn't we see it? Because every place we run these components (the docs site, our own render pipeline, our preview audit) is one big project where those packages are already installed. The registry metadata was wrong, and nothing that used it ever noticed, because nothing used it from a blank slate.

This is the failure mode of every copy-paste registry, ours included: the code is tested, but the description of what the code needs is not. In our repo it's just text in a JSON file.

Required props on a composition that add registers without them

p11: added data-story
src/Root.tsx:16: error TS2322: Property 'defaultProps' is missing

When you add a composition, the CLI registers it in your Root.tsx so it shows up in the Studio right away. It registers it with no props. data-story and podcast-clip both had required props: the data to chart, and the audio to play. So the composition you had just added failed to typecheck.

Both now ship sample data. podcast-clip falls back to a hosted demo track until you pass your own audioSrc, so the first thing you see after add is a working clip you can then edit.

Making both of them impossible to reintroduce

Fixing 28 JSON entries by hand only fixes today's 28. So we added two checks:

  • A dependency-closure test. For every registry item, every package its files import at runtime must be declared by the item or by something in its registryDependencies closure. react, react-dom and remotion are allowed because init always installs them. A new component that imports a package without declaring it fails the test suite.
  • A no-required-props type check. Every composition is assigned to a FC<Record<string, never>>, a component that accepts no props. If a composition grows a required prop, tsc fails, and CI runs tsc on every pull request. The test above also checks that the list covers every composition in the registry, so a new one can't skip it.

Neither check needs a fresh project, a network, or a render, so both are cheap enough to run on every change.

You don't need to upgrade

Registry items are fetched from remotionui.com when you run add, not bundled into the CLI. The fixed metadata is already live, so add logo-wall installs @remotion/google-fonts today on any CLI version. If you added one of the affected components earlier and saw "Cannot find module", install the package it names:

If an earlier add left you a missing import
npm i @remotion/google-fonts @remotion/layout-utils

The folder hint needs CLI 0.11.1. npx remotion-ui@latest gets it.

What we'd tell anyone shipping a registry

  1. Count failures before you count installs. Our first week of telemetry was almost useless as a popularity chart. As a failure rate it was the most useful number we had.
  2. Send a reason code, not just a boolean. We spent a day inferring causes from timestamps that one fixed string per event would have given us. Never send the message itself: error messages contain paths.
  3. Replay from a blank project. Your monorepo has every package installed. Your users' projects don't.
  4. Check that add produces a project that compiles. An exit code of 0 only means the files were written.

The telemetry is opt-out (REMOTION_UI_TELEMETRY=0 or DO_NOT_TRACK=1, and it never runs in CI), and every field it sends is listed in the CLI docs. This post is what it's for. If an add fails for you, the next release is more likely to fix it because we can now see which failure it was.