remotion-dev/remotion · error · Error
getStaticFiles() has moved into the `@remotion/studio` packa
Error message
getStaticFiles() has moved into the `@remotion/studio` package. Update your imports.
What it means
Thrown by getStaticFiles() in @remotion/core when ENABLE_V5_BREAKING_CHANGES is on. In Remotion v5 the public-folder introspection API moved from @remotion/core to @remotion/studio, so the core re-export now refuses to run and directs callers to update their imports.
Source
Thrown at packages/core/src/get-static-files.ts:36
const warnPlayerOnce = () => {
if (warnedPlayer) {
return;
}
warnedPlayer = true;
// eslint-disable-next-line no-console
console.warn(
'Called getStaticFiles() while using the Remotion Player. The API is only available while using the Remotion Studio. An empty array was returned.',
);
};
/*
* @description Gets an array containing all files in the `public/` folder. You can reference them by using `staticFile()`.
* @see [Documentation](https://remotion.dev/docs/getstaticfiles)
*/
export const getStaticFiles = (): StaticFile[] => {
if (ENABLE_V5_BREAKING_CHANGES) {
throw new Error(
'getStaticFiles() has moved into the `@remotion/studio` package. Update your imports.',
);
}
if (typeof document === 'undefined') {
warnServerOnce();
return [];
}
if (window.remotion_isPlayer) {
warnPlayerOnce();
return [];
}
return window.remotion_staticFiles;
};
export type StaticFile = {View on GitHub (pinned to 78fe4bb3fd)
Solutions
- Switch the import: import {getStaticFiles} from '@remotion/studio'; and remove it from '@remotion/core' / 'remotion'.
- If you only need it during studio development, gate the call behind a studio-only code path.
- Run the v5 migration guide's codemod or search-and-replace for all getStaticFiles usages.
Example fix
// before
import {getStaticFiles} from 'remotion';
// after
import {getStaticFiles} from '@remotion/studio'; Defensive patterns
Strategy: validation
Validate before calling
// At build time, ensure getStaticFiles is imported from @remotion/studio.
// Runtime guard is not applicable — fix imports instead.
// Example correct import:
import {getStaticFiles} from '@remotion/studio'; Prevention
- When enabling v5 breaking changes, grep for `getStaticFiles` and move all imports to @remotion/studio.
- Run the v5 migration codemod provided in the Remotion docs.
- Keep getStaticFiles calls inside studio-only code paths.
When it happens
Trigger: Importing getStaticFiles from '@remotion/core' (or 'remotion') while running with v5 breaking changes enabled.
Common situations: Upgrading a project to Remotion v5; CI that flips the v5 flag; code that predates the package split still importing from 'remotion'.
Related errors
- watchStaticFile() has moved into the `@remotion/studio` pack
- bundle() no longer supports the legacy positional arguments.
- The config format has changed. Change `Config.Preview.*()` c
- The config format has changed. Change `Config.Bundling.*()`
- The config format has changed. Change `Config.Rendering.*()`
AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12).
Data as JSON: /api/errors/b000e925724f627f.
Report an issue: GitHub.