"npx sb" fails on Windows
See original GitHub issuetldr;
Affects Windows OS users who wants to report (here) a new issue and follow the template instructions
Hi, I wanted to open an issue and found myself opening this issue first because I’ve followed the instructions below on my Windows 10 (Terminal ran as admin) and had gotten an error:
Please create a reproduction by running
npx sb@next repro
Result:
🏃 Starting for react latest
🏗 Bootstrapping react project (this might take a few minutes)
mkdir react && cd react && touch yarn.lock && yarn init --yes && yarn add react react-dom
'touch' is not recognized as an internal or external command,
operable program or batch file.
An error occurred while executing: `mkdir react && cd react && touch yarn.lock && yarn init --yes && yarn add react react-dom`
🚨 Bootstrapping react failed
🚨 Failed to create repro
Error: Error: command exited with code: 1:
at repro (C:\Users\Yaire\.pnpm-store\v3\tmp\_npx\22952\5\node_modules\.pnpm\@storybook+cli@6.5.0-alpha.55\node_modules\@storybook\cli\dist\cjs\repro.js:172:11)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
Windows doesn’t have touch
command so I found a workaround
I also have tried to install yarn
and now it works.
(Why yarn and not pnpm…)
I suggest these things be mentioned as hard requirements prior to running the npx sb@next repro
command on Windows
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Storybook for React tutorial, failing to install npx - Stack Overflow
When I run the npx -p @storybook/cli sb init command, it will fail to install and I receive this error. npm ERR! Unexpected...
Read more >Trouble with NPX when trying to install Storybook - Reddit
Use a package.json script. When you run npm run storybook it will run the script called "storybook" inside your package.json - but notably...
Read more >storybook failed to fetch dynamically imported module - You.com
Had multiple issues upgrading through yarn upgrade so the final solution was to remove all old packages and run npx -p @storybook/cli@ sb...
Read more >@storybook/cli | Yarn - Package Manager
Storybook CLI (Command Line Interface) is the easiest way to add Storybook to your project. Screenshot. Go to your project and run: cd...
Read more >npx sb init ends abruptly with EBADPLATFORM error #14433
Describe the bug Installing storybook on a create react app based project appears to crash on Windows due to usage of fsevents ....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@vladgorbachev there are some changes in 7.0 to the way storybook is run. You can check out https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#from-version-65x-to-700, and can also run
npx sb@future automigrate
to handle most of the changes from 6.5 to 7.0.npx sb upgrade --prerelease but after
alpha31, react 18.2.0