Troubleshooting
Troubleshooting your code, especially when working with SharePoint, is often time-consuming and generally quite complex. You have to factor in the inner workings of SharePoint, possibly Office 365 also, and your code and deployment approach. The following guidance will walk you through the necessary tasks that are especially helpful when working with the toolchain that the SharePoint Framework requires. Occasionally, even if everything seems to be in order, it helps to fix your development environment if you walk through these simple steps.
Ensuring an up-to-date npm
Sometimes, you'll run into unforeseen issues while developing for the SharePoint Framework. These issues might include different errors during your development cycle, such as when you generate a new project with Yeoman.
One of the basic things to do is to update npm, the Node Package Manager, that you installed in Chapter 3, Getting Started with the SharePoint Framework.
In order to force an update on npm, use npm...