remotion-dev/remotion · error · Error
The bundle at ${resolvedBundleDir} is not relocatable. Rebui
Error message
The bundle at ${resolvedBundleDir} is not relocatable. Rebuild it using Remotion v4.0.497 or newer. What it means
Thrown by validateBundleDir() when index.html's `window.remotion_publicPath` is present and parseable but is not exactly './'. Lambda deploys require a relocatable bundle (relative public path) so assets resolve correctly once uploaded to S3. This property was introduced in Remotion v4.0.497.
Source
Thrown at packages/lambda/src/shared/validate-bundle-dir.ts:86
throw new Error(
`The bundle directory ${resolvedBundleDir} does not contain an index.html file at its root.`,
);
}
const bundleScriptPath = path.join(resolvedBundleDir, 'bundle.js');
if (
!fs.existsSync(bundleScriptPath) ||
!fs.statSync(bundleScriptPath).isFile()
) {
throw new Error(
`The bundle directory ${resolvedBundleDir} does not contain a bundle.js file at its root.`,
);
}
const indexHtml = fs.readFileSync(indexHtmlPath, 'utf8');
const publicPath = getPublicPath(indexHtml);
if (publicPath !== './') {
throw new Error(
`The bundle at ${resolvedBundleDir} is not relocatable. Rebuild it using Remotion v4.0.497 or newer.`,
);
}
validateNoDirectorySymlinks(resolvedBundleDir, resolvedBundleDir);
return resolvedBundleDir;
};
View on GitHub (pinned to 78fe4bb3fd)
Solutions
- Upgrade @remotion/bundler and all Remotion packages to v4.0.497 or newer and re-run `npx remotion bundle`.
- Clear any CI/local bundle cache so a fresh relocatable bundle is produced.
- Ensure no custom bundling config sets an absolute publicPath.
Example fix
// before - deploying a bundle from v4.0.400
// after
// $ npm i @remotion/bundler@latest @remotion/lambda@latest
// $ npx remotion bundle
// then deploySiteFromBundle({bundleDir: '<fresh output dir>'}) Defensive patterns
Strategy: validation
Validate before calling
import fs from 'node:fs'
const html = fs.readFileSync(`${bundleDir}/index.html`, 'utf8')
const m = html.match(/window\.remotion_publicPath\s*=\s*("(?:[^"\\]|\\.)*")\s*;/)
if (!m || JSON.parse(m[1]) !== './') {
throw new Error('Bundle is not relocatable. Rebuild with Remotion v4.0.497+.')
} Prevention
- Keep all Remotion packages on the same recent version.
- Bust CI bundle caches when upgrading Remotion so stale bundles are not deployed.
- Add a pre-deploy check for publicPath === './'.
When it happens
Trigger: Deploying a bundle produced by a Remotion version older than v4.0.497, or a bundle whose publicPath was set to an absolute URL or a different relative value.
Common situations: Upgrading @remotion/lambda but still deploying a stale cached bundle built with an older Remotion; CI cache serving an old bundle; a custom bundling step overriding publicPath.
Related errors
- Lambda Insights is not supported by AWS in region ${region}.
- No bucket with the name ${bucketName} exists
- `throwIfSiteExists` was passed as true, but there are alread
- The bundle directory ${resolvedBundleDir} does not exist. Ru
- A custom role ARN must either be "undefined" or a string, bu
AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12).
Data as JSON: /api/errors/39f8b701692c8391.
Report an issue: GitHub.