-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CLI: Exit when user does not select a storybook project type #23201
Conversation
01fb91b
to
c85081b
Compare
|
||
logger.log(); | ||
logger.log('For more information about installing Storybook: https://storybook.js.org/docs'); | ||
process.exit(0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shilman reminder to check this later, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm ok with this. I think it's not great for our telemetry, but hopefully it's a small corner case.
|
||
logger.log(); | ||
logger.log('For more information about installing Storybook: https://storybook.js.org/docs'); | ||
process.exit(0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm ok with this. I think it's not great for our telemetry, but hopefully it's a small corner case.
REACT = 'REACT', | ||
REACT_SCRIPTS = 'REACT_SCRIPTS', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the story here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have a big error count regarding "Storybook does not support react-scripts < 5.0.0" and this error can also be thrown when you choose react-scripts from the list of projects to install, but you don't have react-scripts installed.
I suspect what is influencing this count so much is that people just press enter when they get a list of options, and react-scripts is the first in the list. By changing the order, people will get react
instead, free of the possibility of crashing with the react-scripts issue.
…roject CLI: Exit when user does not want to select a storybook project type (cherry picked from commit dcb93a7)
…roject CLI: Exit when user does not want to select a storybook project type (cherry picked from commit dcb93a7)
…roject CLI: Exit when user does not want to select a storybook project type (cherry picked from commit dcb93a7)
…roject CLI: Exit when user does not want to select a storybook project type (cherry picked from commit dcb93a7)
…roject CLI: Exit when user does not want to select a storybook project type (cherry picked from commit dcb93a7)
…roject CLI: Exit when user does not want to select a storybook project type (cherry picked from commit dcb93a7)
Closes #
What I did
Currently, when users try to install Storybook in a directory where no project type is detected, we prompt if they would like to select from a list. However, if the user selects "no", the process will continue and will get into a failure:
This PR fixes it by exiting the process successfully and providing link to the docs:
How to test
Checklist
MIGRATION.MD
Maintainers
make sure to add the
ci:merged
orci:daily
GH label to it.["cleanup", "BREAKING CHANGE", "feature request", "bug", "documentation", "maintenance", "dependencies", "other"]