-
-
Notifications
You must be signed in to change notification settings - Fork 9k
fix(create-docusaurus): give a clearer message when installation failed #6095
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
Conversation
✔️ [V2] 🔨 Explore the source changes: 2ddfe2a 🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/61b9e7563678f300072b200f 😎 Browse the preview: https://deploy-preview-6095--docusaurus-2.netlify.app |
⚡️ Lighthouse report for the changes in this PR:
Lighthouse ran on https://deploy-preview-6095--docusaurus-2.netlify.app/ |
Size Change: 0 B Total Size: 652 kB ℹ️ View Unchanged
|
console.log(`The site directory has been created, and you can retry by typing: | ||
${chalk.cyan('cd')} ${cdpath} | ||
${chalk.cyan(`${pkgManager} install`)}`); |
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.
Is it a good idea to print just yarn
if pkgManager===yarn
because yarn install
doesn't make much sense.
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.
yarn install
makes sense. In fact I always prefer yarn install
to yarn
.
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.
Ohh! That's good then. I just read yarn
instead of yarn install
elsewhere, that's why I commented to ask. Awesome and sorry for nitpicking; was just looking at the PR code haha :)
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.
Yeah, thanks for the review still!
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.
Also, Josh; if there are similar beginner friendly issues; always feel free to assign and tag me! I would love to contribute too ;)
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 are focused on shipping the rc release so the remaining few tasks in our todo list are getting increasingly harder :/ I'll continue to delegate easier issues to the community as soon as I can think of one, so just keep updated. e.g. #6058 would be interesting to work on, as long as you have solid React skills
throw err; | ||
).code !== 0 | ||
) { | ||
isInstallSuccessful = false; |
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.
was wondering if we couldn't abort early here? throw or `exit(1)``
That could make the workflow simpler
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 don't want it to exit with 1. Installation is an optional step that the user can easily recover from. As long as we have a clear message, I think it's fine
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.
then what about exit 0 :D as long as you bail out early the code becomes simpler
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.
Ah, I see what you mean😄Yeah, makes sense
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.
Thanks, :)
LGTM 👍 |
Motivation
Fix #6083.
Have you read the Contributing Guidelines on pull requests?
Yes