remotion-dev/remotion · warning · Error
Could not find source map contents for ${compositionFile}
Error message
Could not find source map contents for ${compositionFile} What it means
Thrown in Remotion Studio's open-in-editor flow for read-only Studio deployments: when resolving where a composition's component is defined, the Studio looks up source map files registered for the composition's bundle file and throws if none are found. Source maps must be present in the Studio's in-memory file registry for the editor-jump feature to symbolicate stack traces and component locations. Their absence means the bundle was built without sourcemaps or the file registry wasn't populated.
Source
Thrown at packages/studio/src/helpers/open-in-editor.ts:231
});
const existing = componentResolutionCache.get(cacheKey);
if (existing) {
return existing;
}
const promise = (async () => {
const request = {
compositionFile,
compositionId,
};
const browserStudioOperations = getBrowserStudioOperations();
const body = browserStudioOperations
? await browserStudioOperations.getCompositionComponentInfo(request)
: typeof window !== 'undefined' && window.remotion_isReadOnlyStudio
? await (async () => {
const files = getSourceMapFilesForSource(compositionFile);
if (files === null) {
throw new Error(
`Could not find source map contents for ${compositionFile}`,
);
}
const {resolveCompositionComponentLocation} =
await import('@remotion/studio-codemods/resolve-composition-component-location');
return {
canAddSequence: false,
location: resolveCompositionComponentLocation({
compositionFile,
compositionId,
project: {files, rootDir: '.'},
}),
};
})()
: await callApi('/api/composition-component-info', request);
const result = {View on GitHub (pinned to a6a7485a9a)
Solutions
- Rebuild the Studio bundle with source maps enabled (Remotion's default devtool setting) and deploy the sourcemap contents
- Check any custom webpack.override.js for devtool: false or SourceMapDevToolPlugin exclusions and remove them
- Ensure the sourcemap files referenced by the bundle are actually served/uploaded with the deployment
- Verify the composition entry file is included in the bundle's source map sources array
Example fix
// before // webpack.override.js Config.output.devtool = false; // after // webpack.override.js — keep sourcemaps so Studio can resolve component locations Config.output.devtool = 'source-map';
Defensive patterns
Strategy: fallback
Validate before calling
// Detect read-only Studio lacking sourcemaps before offering 'open in editor'
const hasSourcemaps = typeof window !== 'undefined'
? !!(window as any).remotion_isReadOnlyStudio === false || filesAvailable()
: true;
if (!hasSourcemaps) {
disableOpenInEditor();
} Try / catch
try {
await loadCompositionComponentInfo(request);
} catch (err) {
if (err instanceof Error && err.message.includes('Could not find source map contents')) {
// degrade gracefully: hide the editor jump, show file path from bundle instead
return fallbackComponentInfo();
}
throw err;
} Prevention
- Keep source maps enabled in Studio production builds
- Don't strip .map files from deployed Studio bundles
- Test 'open in editor' after any webpack override changes
When it happens
Trigger: Running a deployed/read-only Studio (window.remotion_isReadOnlyStudio) whose Webpack bundle was compiled without source maps, or where the sourcemap-contents files were stripped/not uploaded; triggering 'open in editor' or component-info resolution for a composition in such a deployment.
Common situations: Production Studio builds with devtool disabled or sourcemaps excluded to shrink the bundle; overrides of webpack config that drop sourcemap emission; CDN/hosting setups that don't upload .map files; version mismatches after upgrading Remotion where sourcemap registration changed.
Related errors
- Studio server port should be a number. Got ${typeof port} ($
- Studio server port should be a number between 1 and 65535. G
- Caching flag must be a boolean.
- Polling must be a number or null, got ${JSON.stringify(
- Job is not running
AI-assisted analysis of remotion-dev/remotion@a6a7485a9a (2026-08-28).
Data as JSON: /api/errors/b1a888840c2dc7f9.
Report an issue: GitHub.