canirequire

canirequireCommonJS › @storybook/addon-info

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

A Storybook addon to show additional information for your stories.

Last verified Sep 9, 2026 against @storybook/addon-info@5.3.21. JSON

CommonJS CommonJS — require() works on every Node.js version

@storybook/addon-info ships CommonJS only. require("@storybook/addon-info") works everywhere. import "@storybook/addon-info" also works because Node.js and Bun can import CommonJS from ES modules, but only the default export is guaranteed; named imports depend on Node's static analysis of the module.

Latest
5.3.21 (Aug 28, 2020)
Module format
CommonJS
Last CommonJS version
5.3.21
TypeScript types
@types/storybook__addon-info
Node engines
not declared
License
MIT

Does @storybook/addon-info@5.3.21 actually load? Runtime test results

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

Runtimerequire("@storybook/addon-info")import "@storybook/addon-info"
Node.js 18✗ failsSyntaxError✗ failsSyntaxError
Node.js 20✗ failsSyntaxError✗ failsSyntaxError
Node.js 22✗ failsSyntaxError✗ failsSyntaxError
Node.js 24✗ failsSyntaxError✗ failsSyntaxError
Node.js 26✗ failsSyntaxError✗ failsSyntaxError
Bun 1.4✓ works✓ works

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-info

ES modules (import)

import addonInfo from "@storybook/addon-info";

Named imports from a CommonJS package only work when Node.js can statically detect them. If a named import fails, use the default import and destructure.

CommonJS (require)

const addonInfo = require("@storybook/addon-info");

Module format by version

Derived from the type, main and exports fields of every stable release on npm (133 versions; the newest 60 shown).

VersionsFormatFirst published
4.1.9 – 5.3.21CommonJSJan 23, 2019

Frequently asked

Is @storybook/addon-info ESM-only?

@storybook/addon-info@5.3.21 is a CommonJS package. @storybook/addon-info ships CommonJS only. require("@storybook/addon-info") works everywhere. import "@storybook/addon-info" also works because Node.js and Bun can import CommonJS from ES modules, but only the default export is guaranteed; named imports depend on Node's static analysis of the module.

Can I import @storybook/addon-info with ES module syntax?

Yes. import addonInfo from "@storybook/addon-info" works in Node.js and Bun because they support importing CommonJS modules. Named imports work only when Node.js can statically detect the exports.

Does @storybook/addon-info work in Bun?

Yes. import "@storybook/addon-info" loaded successfully in Bun 1.4 on Sep 9, 2026.

Does @storybook/addon-info ship TypeScript types?

Not bundled. Install the community types with "npm install -D @types/storybook__addon-info".

Links

Other commonjs packages

Similar popularity