Registry / devops / create-storybook

create-storybook

JSON →
library10.3.5jsnpmunverified

The `create-storybook` package is the official command-line interface (CLI) tool for initializing new Storybook projects and adding Storybook to existing projects. It automates the setup of Storybook with various frameworks like React, Vue, Angular, Svelte, and Web Components, configuring builders like Webpack or Vite, and installing necessary dependencies and addons. The current stable version is 10.3.5, with active development indicated by frequent alpha releases (e.g., 10.4.0-alpha.x) suggesting a continuous integration and release cadence, likely leading to major stable updates every few months. Its key differentiator is being the canonical and supported method to get started with Storybook, ensuring compatibility and best practices are followed for a smooth development workflow for UI components in isolation.

npm install create-storybook
INSTALL
IMPORT
SIG · CREATE-STORYBOOK
C
create-storybook
devopsjavascriptv10.3.5
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

init (npx)
npx storybook@latest init
npx create-storybook@latest
This package is a CLI tool and is not imported directly into JavaScript/TypeScript code. The `npx storybook@latest init` command is the officially recommended way to initialize a Storybook project, which leverages `create-storybook` internally. Using `npx create-storybook@latest` directly is also possible but less common in documentation.
init (yarn)
yarn create storybook
yarn create create-storybook
For Yarn users, `yarn create storybook` is the idiomatic way to invoke the Storybook initializer, equivalent to `npx storybook@latest init`.
init (npm)
npm create storybook@latest
npm init storybook
`npm create <initializer>` (since npm 6.1.0) is the modern way to run `create-<initializer>` packages. `npm init storybook` might work as an alias on some systems, but `npm create storybook@latest` is the explicit and recommended command.

Initializes a new Storybook project in the current directory, guides through setup, and then demonstrates how to launch the Storybook development server.

npx storybook@latest init # Follow the interactive prompts to select your framework (e.g., React, Vue, Angular) # and configure Storybook. Once installation is complete, navigate into your project directory. cd my-storybook-project # Start Storybook's development server npm run storybook
create-storybook --version
Debug
Known issues
breakingStorybook versions 10.3.5 and higher disable the component manifest by default. If your project relies on this feature, particularly when upgrading from an older Storybook 10.x version (>= 10.3.0) without the `@storybook/addon-mcp` installed or updated, this will be a breaking change.
fix
If you use the `@storybook/addon-mcp` for AI-assisted UI development workflows, ensure you upgrade it to version `>=0.5.0` to re-enable component manifests. Otherwise, you might need to manually configure Storybook to re-enable the manifest if a configuration option becomes available, or adjust your workflow.
affects: >=10.3.5
gotchaStorybook, especially recent versions installed by `create-storybook`, requires modern Node.js environments. Node.js versions older than 18 are officially deprecated, and versions older than 20 might experience issues or be unsupported for the latest Storybook features.
fix
Ensure your Node.js version is 20 or higher for optimal compatibility. Use a Node.js version manager like `nvm` to easily switch and manage Node.js versions (e.g., `nvm install 20 && nvm use 20`).
affects: >=10.0.0
gotchaUsing `npx create-storybook` or `npm init storybook` without specifying `@latest` can lead to an outdated installer being used, which may set up an older Storybook version or contain known bugs.
fix
Always use `npx storybook@latest init` or `npm create storybook@latest` to ensure you are running the most current version of the installer and benefiting from the latest features and bug fixes.
affects: <10.3.5
gotchaStorybook's rapid release cycle includes frequent alpha and beta versions (e.g., `10.4.0-alpha.x`). While these introduce cutting-edge features, they are not stable and may contain bugs or breaking changes not documented in stable releases.
fix
Avoid installing alpha or beta versions in production environments. Explicitly use `@latest` with `npx storybook@latest init` or `npm create storybook@latest` to get the most recent stable release. If testing pre-release features, be prepared for instability and consult the specific alpha/beta changelogs.
affects: >=10.4.0-alpha.0
Errors
Common errors & fixes
Error: Your current version of Node.js is X. Storybook requires Node.js >= Y.
The installed Node.js version does not meet Storybook's minimum requirements, which are increasingly strict with newer Storybook releases.
fix
Upgrade your Node.js environment to version 20 or newer. Use `nvm install 20 && nvm use 20` or similar for your preferred Node.js version manager.
npm ERR! code EUSAGE
Incorrect command syntax for `npm create` or an outdated `npm` client. This error often occurs when `npm init` is used incorrectly or `npm create` with wrong arguments.
fix
Ensure you are using the correct command: `npm create storybook@latest` or `npx storybook@latest init`. Also, ensure your `npm` client is up to date (`npm install -g npm@latest`).
Error: Cannot find module 'webpack' (or other builder-related module) after installation.
Webpack, Vite, or other builder dependencies were not correctly installed or there's a version mismatch after Storybook setup, possibly due to a corrupted `node_modules` or conflicting peer dependencies.
fix
Try reinstalling project dependencies (`npm install` or `yarn install`) in your project directory. If the problem persists, check your `package.json` for conflicting dependencies or try re-running `npx storybook@latest init` with the `--force` flag (if available and appropriate) or consult Storybook's troubleshooting guide for builder-specific issues.
Upgrade
Version history
10.3.5latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
21 hits · last 30 days
node
18
OpenAI (training)
1
Resources
create-storybook — npm install create-storybook · libregistry