remotion-dev/remotion · error · Error

No lockfile was found in your project (one of ${StudioServer

Error message

No lockfile was found in your project (one of ${StudioServerInternals.lockFilePaths
				.map((p) => p.path)
				.join(', ')}). Install dependencies using your favorite manager!

What it means

Thrown by the upgrade command when StudioServerInternals.getPackageManager returns 'unknown', meaning none of the recognised lockfiles (package-lock.json, yarn.lock, bun.lockb, pnpm-lock.yaml, etc. - listed in StudioServerInternals.lockFilePaths) were found at or above the remotion root. Without a lockfile Remotion cannot infer which package manager to invoke for the upgrade.

Source

Thrown at packages/cli/src/upgrade.ts:153

		);
	} else {
		targetVersion = await StudioServerInternals.getLatestRemotionVersion();
		Log.info(
			{indent: false, logLevel},
			'Newest Remotion version is',
			targetVersion,
		);
	}

	const manager = StudioServerInternals.getPackageManager({
		remotionRoot,
		packageManager,
		dirUp: 0,
		logLevel,
	});

	if (manager === 'unknown') {
		throw new Error(
			`No lockfile was found in your project (one of ${StudioServerInternals.lockFilePaths
				.map((p) => p.path)
				.join(', ')}). Install dependencies using your favorite manager!`,
		);
	}

	const extraPackageVersions =
		getExtraPackageVersionsForRemotionVersion(targetVersion);
	const workspaceRoot = findWorkspaceRoot(remotionRoot);
	const catalogEntries = workspaceRoot ? getCatalogEntries(workspaceRoot) : {};

	const {normalPackages, catalogPackages} = getPackagesToUpgrade({
		depsWithVersions,
		catalogEntries,
		targetVersion,
		extraPackageVersions,
	});

View on GitHub (pinned to 78fe4bb3fd)

Solutions

  1. Install dependencies once with your package manager (`npm install`, `yarn`, `bun install`, or `pnpm install`) to generate the lockfile, then re-run `npx remotion upgrade`.
  2. Run the command from the project root that contains (or should contain) the lockfile.
  3. Pass --package-manager explicitly if your workflow uses a non-detected setup.

Example fix

// before - no lockfile present
$ npx remotion upgrade
// after - generate lockfile first
$ bun install
$ npx remotion upgrade
Defensive patterns

Strategy: validation

Validate before calling

import {existsSync} from 'node:fs';

const LOCKFILES = ['package-lock.json', 'yarn.lock', 'bun.lockb', 'pnpm-lock.yaml'];

const ensureLockfile = (root: string) => {
  if (!LOCKFILES.some((f) => existsSync(`${root}/${f}`))) {
    throw new Error(`No lockfile found in ${root}. Run your package manager's install first.`);
  }
};

ensureLockfile(remotionRoot);

Type guard

const hasLockfile = (root: string): boolean =>
  LOCKFILES.some((f) => existsSync(path.join(root, f)));

Prevention

When it happens

Trigger: Running `npx remotion upgrade` (or `npx remotion add`) in a directory that has no lockfile - e.g. a fresh project where dependencies were never installed, or a directory that is not the project root.

Common situations: Cloning a repo whose lockfile is gitignored; running the command in a subdirectory; a project that uses an unsupported/custom package manager; a fresh `git init` with package.json but no install yet.

Related errors


AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12). Data as JSON: /api/errors/7972bac300b11cfb. Report an issue: GitHub.