{"record":{"id":"7972bac300b11cfb","repo":"remotion-dev/remotion","slug":"no-lockfile-was-found-in-your-project-one-of-st-7972ba","errorCode":null,"errorMessage":"No lockfile was found in your project (one of ${StudioServerInternals.lockFilePaths\n\t\t\t\t.map((p) => p.path)\n\t\t\t\t.join(', ')}). Install dependencies using your favorite manager!","messagePattern":"No lockfile was found in your project \\(one of (.+?)\\)\\. Install dependencies using your favorite manager!","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/cli/src/upgrade.ts","lineNumber":153,"sourceCode":"\t\t);\n\t} else {\n\t\ttargetVersion = await StudioServerInternals.getLatestRemotionVersion();\n\t\tLog.info(\n\t\t\t{indent: false, logLevel},\n\t\t\t'Newest Remotion version is',\n\t\t\ttargetVersion,\n\t\t);\n\t}\n\n\tconst manager = StudioServerInternals.getPackageManager({\n\t\tremotionRoot,\n\t\tpackageManager,\n\t\tdirUp: 0,\n\t\tlogLevel,\n\t});\n\n\tif (manager === 'unknown') {\n\t\tthrow new Error(\n\t\t\t`No lockfile was found in your project (one of ${StudioServerInternals.lockFilePaths\n\t\t\t\t.map((p) => p.path)\n\t\t\t\t.join(', ')}). Install dependencies using your favorite manager!`,\n\t\t);\n\t}\n\n\tconst extraPackageVersions =\n\t\tgetExtraPackageVersionsForRemotionVersion(targetVersion);\n\tconst workspaceRoot = findWorkspaceRoot(remotionRoot);\n\tconst catalogEntries = workspaceRoot ? getCatalogEntries(workspaceRoot) : {};\n\n\tconst {normalPackages, catalogPackages} = getPackagesToUpgrade({\n\t\tdepsWithVersions,\n\t\tcatalogEntries,\n\t\ttargetVersion,\n\t\textraPackageVersions,\n\t});\n","sourceCodeStart":135,"sourceCodeEnd":171,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/cli/src/upgrade.ts#L135-L171","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"// before - no lockfile present\n$ npx remotion upgrade\n// after - generate lockfile first\n$ bun install\n$ npx remotion upgrade","handlingStrategy":"validation","validationCode":"import {existsSync} from 'node:fs';\n\nconst LOCKFILES = ['package-lock.json', 'yarn.lock', 'bun.lockb', 'pnpm-lock.yaml'];\n\nconst ensureLockfile = (root: string) => {\n  if (!LOCKFILES.some((f) => existsSync(`${root}/${f}`))) {\n    throw new Error(`No lockfile found in ${root}. Run your package manager's install first.`);\n  }\n};\n\nensureLockfile(remotionRoot);","typeGuard":"const hasLockfile = (root: string): boolean =>\n  LOCKFILES.some((f) => existsSync(path.join(root, f)));","tryCatchPattern":null,"preventionTips":["Commit your lockfile to version control.","Run an install step before upgrade in CI.","Run `remotion upgrade` from the project root."],"tags":["cli","upgrade","package-manager","lockfile"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}