Use the Storybook CLI to install it in a single command. Run this inside your existing project’s root directory:
- With npm:
npx storybook init
- With pnpm:
pnpm dlx storybook init
If you run into issues with the installation, check the Troubleshooting section below for guidance on how to solve it.