storybookjs / storybook

Storybook is the industry standard workshop for building, documenting, and testing UI components in isolation
https://storybook.js.org
MIT License
84.23k stars 9.26k forks source link

Repro creation not working #18318

Open fabpico opened 2 years ago

fabpico commented 2 years ago

I was told to create a repro, but npx sb@next repro fails on bootstrapping.

โˆš ๐ŸŒˆ Select the repro framework ยป react                                  
โˆš ๐Ÿ“ Select the repro base template ยป cra
โˆš Enter the output directory ... cra
๐Ÿƒ Running cra into C:\Users\fbp\Desktop\storybook repro\cra

๐Ÿƒ Starting for cra latest

๐Ÿ— Bootstrapping cra project (this might take a few minutes)
npm_config_user_agent=npm npx -p create-react-app@latest create-react-app cra && cd cra && echo "FAST_REFRESH=true" > .env && echo "SKIP_PREFLIGHT_CHECK=true" > .env
'npm_config_user_agent' is not recognized as an internal or external command,
operable program or batch file.
An error occurred while executing: `npm_config_user_agent=npm npx -p create-react-app@latest create-react-app cra && cd cra && echo "FAST_REFRESH=true" > .env && echo "SKIP_PREFLIGHT_CHECK=true" > .env`
๐Ÿšจ Bootstrapping cra failed
๐Ÿšจ Failed to create repro
Error: Error: command exited with code: 1:
    at repro (C:\Users\fbp\AppData\Local\npm-cache\_npx\eebb2d3a7d26a7f1\node_modules\@storybook\cli\dist\cjs\repro.js:172:11)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

To Reproduce

Run npx sb@next repro, choose react -> template cra -> output cra. Or Run npx sb@next repro, choose react -> template react -> output react.

Also after running yarn cache clean, the issue persists.

System

Environment Info:

  System:
    OS: Windows 10 10.0.19044
    CPU: (8) x64 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz
  Binaries:
    Node: 16.15.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.10 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 8.3.2 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Spartan (44.19041.1266.0), Chromium (101.0.1210.53)
unional commented 1 year ago
โˆš ๐ŸŒˆ Select the repro renderer ยป react
โˆš ๐Ÿ“ Select the repro base template ยป react_typescript
โˆš Enter the output directory ... react_typescript
๐Ÿƒ Running react_typescript into D:\code\justland\react_typescript

๐Ÿƒ Starting for react_typescript latest

๐Ÿ— Bootstrapping react_typescript project (this might take a few minutes)
mkdir react_typescript && cd react_typescript && 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.
'touch' is not recognized as an internal or external command,
operable program or batch file.

I'm getting error on touch. Seems like it does not work with Windows env.