# CMS React modules suddenly fail server rendering:

**URL:** <https://community.hubspot.com/t/cms-react-modules-suddenly-fail-server-rendering/163791>\
**Category:** CMS Development\
**Tags:** developer\
**Created:** [November 3, 2026, 9:37am UTC](https://community.hubspot.com/t/cms-react-modules-suddenly-fail-server-rendering/163791 "2026-11-03T09:37:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![FerdiBONANA](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/ferdibonana/32/230075_2.png) [@FerdiBONANA](https://community.hubspot.com/u/FerdiBONANA)\
**Post date:** [November 3, 2026, 9:37am UTC](https://community.hubspot.com/t/cms-react-modules-suddenly-fail-server-rendering/163791/1 "2026-11-03T09:37:15Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Berangere](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/berangere/32/220784_2.png) [@Berangere](https://community.hubspot.com/u/Berangere)\
**Post date:** [November 3, 2026, 1:12pm UTC](https://community.hubspot.com/t/cms-react-modules-suddenly-fail-server-rendering/163791/3 "2026-11-03T13:12:24Z")

</div>

Hey @FerdiBONANA 👋 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

---

<div class="post-metadata">

**Author:** ![FerdiBONANA](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/ferdibonana/32/230075_2.png) [@FerdiBONANA](https://community.hubspot.com/u/FerdiBONANA)\
**Post date:** [November 4, 2026, 12:34pm UTC](https://community.hubspot.com/t/cms-react-modules-suddenly-fail-server-rendering/163791/4 "2026-11-04T12:34:29Z")

</div>

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.

```tsx
// 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
}

```

```tsx
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`.
