question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"npx sb" fails on Windows

See original GitHub issue

tldr;

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:open
  • Created a year ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
IanVScommented, Sep 28, 2022

@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.

0reactions
vladgorbachevcommented, Sep 11, 2022

npx sb upgrade --prerelease but after

'start-storybook' is not recognized as an internal or external command,

alpha31, react 18.2.0

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found