This is a preview of the Storyblok Website with Draft Content

JoyConf 2026 is back. Content Confidence. Human Connection. Save your spot!

Fixing Headers not defined error in Storyblok SDK

All Storyblok SDKs are based on the storyblok-js-client v5 (opens in a new window), built using the native Fetch API. There are some environments and versions of Node where the Fetch API, such as (Node <= 17), is not implemented, and you'd need to install a polyfill.

Hint:

We recommend isomorphic fetch polyfill.

You get the error below when the fetch API isn't available in your environment.

ReferenceError : Headers is not defined

To fix the error above, install isomorphic fetch polyfill in your application using the command below

npm install --save isomorphic-fetch

You can learn more about the isomorphic fetch API here (opens in a new window).