remotion-dev/remotion · error · Error
No lockfile was found in your project
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.
Solutions
- 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`.
- Run the command from the project root that contains (or should contain) the lockfile.
- 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
- Commit your lockfile to version control.
- Run an install step before upgrade in CI.
- Run `remotion upgrade` from the project root.
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
- No lockfile was found in your project
- unknown package manager
- A Remotion upgrade is already in progress.
- A template must be specified when using --yes. Example…
- Both an output flag (--output) and an output location as a…
AI-assisted analysis of remotion-dev/remotion@10db9de073 (2026-08-12).
Data as JSON: /api/errors/7972bac300b11cfb.
Report an issue: GitHub.
Appendix: 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 10db9de073)