Fixing Headers not defined error in Storyblok SDK
All Storyblok SDKs are based on the storyblok-js-client v5, 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.
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
You can learn more about the isomorphic fetch API here.