CMS React modules suddenly fail server rendering:

Since the morning of 3 November 2026, every CMS React module in our project that imports gsap at module level fails server-side rendering. The modules are simply missing from the page. Nothing in the dependency setup changed on our side.

Errors in the page source:
Error when server rendering @projects//app/components/modules/Hero
SyntaxError: Named export ‘MorphSVGPlugin’ not found. The requested module ‘gsap/MorphSVGPlugin’ is a CommonJS module, which may not support all module.exports as named exports.

After switching that import to a namespace import, the next one failed:
SyntaxError: Named export ‘gsap’ not found. The requested module ‘gsap’ is a CommonJS module …
And after switching that one too:
SyntaxError: Cannot use import statement outside a module

Timeline (CET):

  • 2 Nov 14:22: production build deployed, server rendering fine (checked that afternoon).
  • 2 Nov ~15:30: sandbox build deployed, same code. It still renders fine today.
  • 3 Nov ~09:40: new production build (CSS and layout changes only, nothing touching gsap): server rendering fails.
  • 3 Nov, shortly after: redeployed the previous production build with hs project deploy --build. It fails the same way, although it worked the day before.
  • 3 Nov: a new sandbox build of the same code fails as well.

Workaround: we moved gsap out of the server render (a dynamic import() inside useEffect), and the pages render again.

Questions:

  1. Did the Node version or module resolution of the CMS React server renderer change around 2 to 3 November? It looks like ESM syntax detection is no longer applied to packages without “type”: “module”.
  2. Why does redeploying an older build pick up the new behaviour, while a deployment from the day before keeps working?
  3. Where are changes to the server rendering runtime announced, so we can test before they hit production?

Hey @FerdiBONANA :waving_hand: Welcome to the HubSpot Community and thanks for reaching out!

Let me take a look internally to see what’s happening and I’ll get back to you as soon as possible about it.

Thanks for your patience!

Bérangère, HubSpot Community Manager

In case anyone else has this issue, read the following.

Root cause and fix

Since around 3 November 2026, HubSpot’s server render loads npm packages natively as CommonJS. Any island with a module-level import gsap from 'gsap' now crashes on the server with Named export 'gsap' not found or Cannot use import statement outside a module.

HubSpot then drops the whole module, including the CSS it imports. Rolling back to an older build or switching to the npm gsap package does not help.

Quick workaround: add clientOnly={true} to those Islands. The crash stops, but their content is no longer in the server HTML.

Proper fix: load gsap in the browser only, inside an effect.

// useGsap.ts
import { useEffect, useState } from 'react';

export default function useGsap() {
  const [gsap, setGsap] = useState(null);
  useEffect(() => {
    import('gsap').then((mod) => setGsap(() => mod.gsap));
  }, []);
  return gsap; // null on the server
}

const gsap = useGsap();
useEffect(() => {
  if (!gsap) return;
  // plugins too: const { ScrollTrigger } = await import('gsap/ScrollTrigger');
}, [gsap]);

Remove every module-level gsap import and registerPlugin call, then remove clientOnly again.

To reproduce HubSpot’s error locally, run Node with --no-experimental-detect-module.