canirequire

canirequire › Dual (CommonJS + ESM) › @storybook/addon-actions

Is @storybook/addon-actions ESM-only? Can you require() it?

Empty package - please don't use it anymore

Last verified Sep 9, 2026 against @storybook/addon-actions@9.0.8. Markdown · JSON

Dual (CommonJS + ESM) Dual package on paper — require() failed in our runtime test

@storybook/addon-actions declares both a CommonJS entry and a native ESM entry (ESM added in 7.0.0), but require("@storybook/addon-actions") failed on every Node.js version in our probe: Your Storybook project is referring to package @storybook/addon-actions, which no longer exists in Storybook 9.0 and above. Please refer …. That usually means a missing peer dependency, a browser-only global, or a package that refuses to be loaded with require(); see the runtime table below.

What to do

  1. require("@storybook/addon-actions") failed in our probe on every Node.js version (Your Storybook project is referring to package @storybook/addon-actions, which no longer exists in Storybook 9.0 and above. Please refer …); check the package README for peer dependencies or setup before relying on it.
  2. TypeScript: types are bundled; install nothing extra.
Latest
9.0.8 (Jun 10, 2025)
Module format
Dual (CommonJS + ESM)
Last CommonJS version
9.0.8
Native ESM since
7.0.0
TypeScript types
Bundled
Node engines
not declared
Weekly downloads
4.1M
License
MIT

Does @storybook/addon-actions@9.0.8 actually load? Runtime test results

Installed and executed on Sep 9, 2026 with require("@storybook/addon-actions") from a CommonJS file and import "@storybook/addon-actions" from an ES module.

Runtimerequire("@storybook/addon-actions")import "@storybook/addon-actions"
Node.js 18✗ failsError✗ failsError
Node.js 20✗ failsError✗ failsError
Node.js 22✗ failsError✗ failsError
Node.js 24✗ failsError✗ failsError
Node.js 26✗ failsError✗ failsError
Bun 1.4.0✗ failsError✗ failsError

A failing require() on a CommonJS package usually means the package needs a browser/DOM global, a peer dependency, or a native binary that is not available in a bare Node.js process.

How to import @storybook/addon-actions

ES modules (import)

import * as addonActions from "@storybook/addon-actions";

Namespace import shown because the ESM entry may have no default export; use named imports for what it exports.

CommonJS (require)

// require("@storybook/addon-actions") failed in our probe on every Node.js version we test (Your Storybook project is referring to package @storybook/addon-actions, which no longer exists in Storybook 9.0 and above. Please refer …); see the runtime table.
const addonActions = require("@storybook/addon-actions");

Module format by version

Derived from the type, main and exports fields of every stable release on npm, corrected where a runtime test of that version contradicted them (399 versions; the newest 60 shown).

VersionsFormatFirst published
8.2.3 – 9.0.8Dual (CommonJS + ESM)Jul 15, 2024

Frequently asked

Is @storybook/addon-actions ESM-only?

@storybook/addon-actions@9.0.8 declares CommonJS and ESM builds, but require() fails at runtime. @storybook/addon-actions declares both a CommonJS entry and a native ESM entry (ESM added in 7.0.0), but require("@storybook/addon-actions") failed on every Node.js version in our probe: Your Storybook project is referring to package @storybook/addon-actions, which no longer exists in Storybook 9.0 and above. Please refer …. That usually means a missing peer dependency, a browser-only global, or a package that refuses to be loaded with require(); see the runtime table below.

Can I require @storybook/addon-actions?

Not in practice. @storybook/addon-actions declares a CommonJS entry, but require("@storybook/addon-actions") failed on every Node.js version in our probe: Your Storybook project is referring to package @storybook/addon-actions, which no longer exists in Storybook 9.0 and above. Please refer …. Check the package README for peer dependencies or setup before relying on it.

Does @storybook/addon-actions work in Bun?

Importing @storybook/addon-actions failed in Bun 1.4.0 on Sep 9, 2026: error: Your Storybook project is referring to package @storybook/addon-actions, which no longer exists in Storybook 9.0 and above. Please refer to the Storybook 9 migration guide for instructions on how to fix this issue: https://storybook.js.org/docs/9/migration-guide#package-structure-changes

Does @storybook/addon-actions ship TypeScript types?

Yes. @storybook/addon-actions bundles its own type declarations; no @types package is needed.

Links

Other dual (commonjs + esm) packages

Similar popularity