canirequire › CommonJS › @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.
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.
| Runtime | require("@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).
| Versions | Format | First published |
|---|---|---|
| 4.1.9 – 5.3.21 | CommonJS | Jan 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
- debug 4.4.3CommonJS
- semver 7.8.5CommonJS
- ms 2.1.3CommonJS
- picomatch 4.0.7CommonJS
- ajv 8.20.0CommonJS
- source-map 0.8.0CommonJS
- react-is 19.2.8CommonJS
- readable-stream 4.7.0CommonJS
Similar popularity
- @angular/http 7.2.16CommonJS
- @alifd/babel-preset-next 2.0.0-betaCommonJS
- @release-it/conventional-changelog 12.0.0ESM-only
- @vue/eslint-config-standard 9.0.1ESM-only
- @vue/cli-plugin-unit-jest 5.0.9CommonJS
- @nomiclabs/hardhat-ethers 2.2.3CommonJS
- @vitest/coverage-c8 0.33.0ESM-only