#61 Find and fix issues in your SharePoint Framework project


When we build apps using JavaScript, we occasionally run into trouble. Whether it’s because of mismatched dependencies, or a specific piece of configuration missing or set incorrectly. If we’re lucky, the error message is clear. But more than often it isn’t, and we’re left puzzled as to what to do next, wasting precious time.

Building apps with SharePoint Framework is no different. There are a few good practices we need to follow so that our project builds and the app we create is fast. It sounds trivial, but when you work with different projects built using versions of SharePoint Framework, there’s a lot for you to remember.

To help you spend less time fixing bugs and more on building your app, together with SharePoint Framework engineering and a few other teams at Microsoft, we extended CLI for Microsoft 365 with a command that helps you find and fix issues in your SharePoint Framework project.

Check out this short video to see how it works:

Using the spfx project doctor command you can find most common mistakes in your SharePoint Framework project. We’ll tell you if you set up your dependencies correctly, and if you configured TypeScript properly. We’ll check a couple of other things as well. For each issue, we’ll tell you what to do to fix it. We hope, that you’ll spend time on the GitHub issues list and more building your app.

Give it a try and I’d love to hear what you think and how we could improve it.

Others found also helpful: