Diagnose Your CLI Issues Quickly with the HS Doctor Command

Joe from Local's devex team shows how HS Doctor diagnoses CLI problems like port conflicts, missing dependencies, invalid access keys, and JSON errors. Run it once and get fixes for common issues that usually take hours to track down.
Hey, everyone. Joe from the Local devex team. I'm excited to share a new community we're working on called HS Dr. And I wanted to give a sneak preview before we publish it later this week. So a quick overview that's designed to help users diagnose common problems with the CLI in their projects. Let's just go ahead and dive right in. So first, I don't know, I'll run through the NTPAS scenario. I'm in a project right here, so it's going to run some diagnostics. I'm going to get three sections. I'm going to need the CLI install, CLI configuration, and project configuration. So you can see I've got all green checks. There's zero errors and zero warnings. So let's go ahead and simulate some errors that it might cause some failure states here. So the first I'll do is I'll install an HTTP server on a port that we expect to be available for local dev. So that's fired up and I can come over here and run that again and you'll see that I get a warning saying port 8080 is in use. Please make sure it's available. So I'm going to stop that and then let's move on to another failure case, which is I might not have my dependencies installed. So I'm going to run a command here that just recursively deletes all my node modules directories, and then go ahead and run the doctor command again and you'll see that it's saying you're missing dependencies and your app functions and your extensions and you can run Project install deps to installer. So I'll go ahead and run that here, installing those two locations and it's done. So then I'll be breaking slow and cool doctor again and we're back to normal. Okay, so another case I'll go through is I have an account here that has a bad personal access key. So if I go ahead and switch to that and you choose local, you'll see I'm getting a warning that I have an invalid personal access key. So let's go ahead and switch back to okay, and then the final case I'll walk through is some cases where you may have invalid JSON and some of the project files. So I'm going to edit my app JSON and I'm just going to go ahead and remove a comma and save the file and run the doctor commit again. And you'll see that I'm getting a warning saying I've in mel JSON my source app. JSON. Okay, that's it. Bye. Bye.










