New Starter Plan

CommonJS Deprecation in the JavaScript SDKs

  • Developer Experience
Illustration of a white shipping box labeled “.mjs” with a faint dashed “.cjs” tag on a light peach background.

Storyblok’s JavaScript SDKs now print a deprecation warning when a project loads their CommonJS builds. The next major version of each package removes CommonJS, and packages below 1.0 may remove it in a minor release.


  • Migration: users can replace require() with import to load the ECMAScript module builds.
  • Silenced warning: users can set STORYBLOK_SILENCE_CJS_DEPRECATION to any non-empty value, or run Node.js with --disable-warning=STORYBLOK_CJS_DEPRECATED.
  • Strict mode: users can set the environment variable to keep --throw-deprecation from stopping the process.
  • Earlier versions: users can stay on their current package versions, which keep CommonJS support.