I created a empty folder and inside I started npx storybook@latest init. It asks me which framework I want, and I select React + Vite. But then it just stops working.
This is the output it shows me:
D:\Arbeitsbereich\Arbeit\Firma\Code\codexaLib>npx storybook@latest init
β π Empty directory detected βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β
β Would you like to generate a new project from the following list? β
β β
β Note: β
β Storybook supports many more frameworks and bundlers than listed below. If you don't see your β
β preferred setup, you can still generate a project then rerun this command to add Storybook. β
β β
β Press ^C at any time to quit. β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Choose a project template Β» React + Vite (TS)
Creating a new "React + Vite (TS)" project with npm...
But even after hours nothing else happens. If I cancel the process, there is only a folder node_modules, but it is empty. I also tried creating a Vite project first, but as soon as I try to add storybook again something similar happens and it stops doing anything.
I also made sure that no VPN is running. I did not check the firewall, butt since I created other projects in the past, I do not think that's the problem.
My Node version is v22.16.0 and npm version is 10.9.2.
1 Answer 1
Storybookβs CLI is meant to be run inside an existing project, not an empty folder.
Please check the official docs. They recommend using npm create storybook@latest (or npx storybook@latest init from inside your app).
If it still hangs:
Try on Node 20+ LTS (newer majors sometimes cause friction).
Clear cache/reinstall deps, or try pnpm/yarn. (General install troubleshooting is common with init.)
So the reliable sequence remains:
npm create vite@latest my-app -- --template react-ts
cd my-app && npm install
npx storybook@latest init # run here, not in an empty dir