The npm doctor command is a diagnostic command. The command runs a set of checks to ensure that the npm installation is in a good state.
npm doctor command checks the following items in your environment.
Node.js and Git install. The tools should be executable by npm.
npm config get registry
The primary npm registry API i.e, https://registry.npmjs.org/
Verify that the npm cache exists and the cache contents. The command verifies that the package tarballs within it aren’t corrupt.
The status message for the items should be in ok so that the npm would work properly without any issues.
Steps to install Node.js on Window 10:
The command reports the problems found with the npm installation. Problems can be errors and warnings. For example, the following error indicates that Git is not installed on the machine and not configured in the system PATH environment variable. To resolve the error, we need to install the Git version control tool and configure it in the PATH.
To install Git on the Windows operating system:
To resolve the config warning: