How to debug a publish or optimization warning

This guide covers two site publishing errors—publishing and optimization errors—and their resolution strategies.

Publishing errors

If a publishing error occurs, you’ll see a toast notification:

“Failed to publish because there is an error on a page.”

A Review button will also be provided.

Common causes of publishing errors

Dynamic runtime errors:

  • The site compiler timed out while waiting for a component to build.

  • Example error in the web inspector: ensureComponentsInLoader: Component loader not updated in time.

  • Solution: Retry publishing. If the issue persists, fix or remove the problematic component.

Missing used components:

  • A component might no longer be available due to a file rename, function rename, or a loading error.

  • Clicking the Review button will highlight the missing component as a grey error placeholder in the layer panel.

Solution: Fix or replace the missing component.

Shows a component error in the Framer editor.

What is optimization?

Framer sites are built using React. Optimization “pre-renders” your site on the server, ensuring visitors see content immediately instead of a blank page while React loads in the background.

Why addressing these warnings matters

Fixing optimization warnings in a Framer project is essential to ensure your website performs well, loads quickly, and ranks higher in search engine results.

  • Script optimization: Framer bundles, chunks, and tree-shakes scripts, removing unnecessary code and organizing the rest for faster loading.

  • Server-side rendering (SSR): Framer delivers pre-rendered content, improving loading speed, user experience, and search engine rankings.

  • Automatic sitemap generation: Framer creates a sitemap to ensure your site is crawlable and visible to search engines.

Consequences of not optimizing your website

  • Slow loading times: Unoptimized pages can frustrate visitors, increase bounce rates, and harm your site’s professionalism.

  • Poor SEO: Without SSR and sitemaps, search engines may struggle to index your site, resulting in lower rankings. Additionally, slow-loading pages are penalized in search rankings.

You can check optimization status under Settings → Domains or Settings → Versions.

The Versions section in the Settings.

Common cause: custom code components or overrides

Custom code that relies on browser-specific APIs, such as window, document, or navigator, may not work properly because Framer’s server pre-renders pages without a browser environment, making these APIs unavailable. If your code component tries to access them during server-side rendering, Framer will hide it and attempt to retry rendering when the page loads. To prevent this, ensure these APIs are accessed inside a useEffect() hook or consider using alternatives like CSS media queries in place of window.innerWidth. If your component still isn’t showing up, check for errors or problematic code in your function.

Customizing based on user data

If your component needs browser-specific information like document.cookie or navigator.language:

Use placeholders: Create a component that shows a placeholder while loading, then updates after the page loads. Example: framer-optim-1.jsx.

Opt-out of optimization: Components can bypass optimization, but their content won’t be accessible to search engines. Use this method sparingly. Example: framer-optim-2.jsx.

For overrides: Use the same approach as components to handle overrides. Example: framer-optim-3.jsx.


By addressing these warnings and utilizing Framer’s built-in tools, you can enhance site performance, improve SEO, and create a better experience for your visitors.

Still experiencing the issue after following the steps above? Create a support ticket in the Community.