Universal JavaScript SDK for Storyblok's Content Delivery and Management APIs. Version 7.3.0 supports Node.js 18+ and modern browsers, with full TypeScript types included. Released as part of the monoblok monorepo, this package is the core client for fetching and manipulating Storyblok content. It provides a thin wrapper around the REST APIs, with built-in caching, rich text rendering, and component resolver support. Key differentiators: isomorphic (works in Node and browser without polyfills), first-class TypeScript support, and seamless integration with Storyblok's visual editor and preview features. Alternatives like @storyblok/js offer framework-agnostic helpers, but this client is the foundational SDK.
npm install storyblok-js-clientVerified import paths — ran on the pinned version, not inferred.
Initializes the Storyblok client with an access token and in-memory caching, then fetches a story by slug in draft version.
Upgrade to Node 18+ or install isomorphic-fetch and import it before using the client.
Update imports: import { RichTextResolver } from 'storyblok-js-client' instead of requiring it from a separate package.Replace `client.get('cdn/stories/home', ...)` with `client.getStory('home', ...)`.Use `const StoryblokClient = require('storyblok-js-client').default;` or switch to ESM imports.Install isomorphic-fetch: npm install isomorphic-fetch, then add `import 'isomorphic-fetch'` at the top of your entry file.
Run `npm install storyblok-js-client` and ensure your import path is correct.
Use `const StoryblokClient = require('storyblok-js-client').default;` instead of `const { StoryblokClient } = require('storyblok-js-client');`.