{"record":{"id":"b000e925724f627f","repo":"remotion-dev/remotion","slug":"getstaticfiles-has-moved-into-the-remotion-stu","errorCode":null,"errorMessage":"getStaticFiles() has moved into the `@remotion/studio` package. Update your imports.","messagePattern":"getStaticFiles\\(\\) has moved into the `@remotion/studio` package\\. Update your imports\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/core/src/get-static-files.ts","lineNumber":36,"sourceCode":"const warnPlayerOnce = () => {\n\tif (warnedPlayer) {\n\t\treturn;\n\t}\n\n\twarnedPlayer = true;\n\t// eslint-disable-next-line no-console\n\tconsole.warn(\n\t\t'Called getStaticFiles() while using the Remotion Player. The API is only available while using the Remotion Studio. An empty array was returned.',\n\t);\n};\n\n/*\n * @description Gets an array containing all files in the `public/` folder. You can reference them by using `staticFile()`.\n * @see [Documentation](https://remotion.dev/docs/getstaticfiles)\n */\nexport const getStaticFiles = (): StaticFile[] => {\n\tif (ENABLE_V5_BREAKING_CHANGES) {\n\t\tthrow new Error(\n\t\t\t'getStaticFiles() has moved into the `@remotion/studio` package. Update your imports.',\n\t\t);\n\t}\n\n\tif (typeof document === 'undefined') {\n\t\twarnServerOnce();\n\t\treturn [];\n\t}\n\n\tif (window.remotion_isPlayer) {\n\t\twarnPlayerOnce();\n\t\treturn [];\n\t}\n\n\treturn window.remotion_staticFiles;\n};\n\nexport type StaticFile = {","sourceCodeStart":18,"sourceCodeEnd":54,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/core/src/get-static-files.ts#L18-L54","documentation":"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.","triggerScenarios":"Importing getStaticFiles from '@remotion/core' (or 'remotion') while running with v5 breaking changes enabled.","commonSituations":"Upgrading a project to Remotion v5; CI that flips the v5 flag; code that predates the package split still importing from 'remotion'.","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."],"exampleFix":"// before\nimport {getStaticFiles} from 'remotion';\n\n// after\nimport {getStaticFiles} from '@remotion/studio';","handlingStrategy":"validation","validationCode":"// At build time, ensure getStaticFiles is imported from @remotion/studio.\n// Runtime guard is not applicable — fix imports instead.\n// Example correct import:\nimport {getStaticFiles} from '@remotion/studio';","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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."],"tags":["v5","breaking-change","imports","studio","migration"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}