LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

npm-doctor

runs diagnostics to check npm environment health

TLDR

Run npm environment diagnostics
$ npm doctor
copy
Run with a specific registry
$ npm doctor --registry [https://registry.npmjs.org]
copy

SYNOPSIS

npm doctor [--registry registry]

DESCRIPTION

npm doctor runs a set of diagnostics to verify the npm environment is healthy. It checks: npm can reach the configured registry, the installed version of node and npm are supported, the npm cache is not corrupt, global and local bin directories exist and are on PATH, the packages tree has correct ownership, and the git binary is available.Each check is reported as OK or shows the specific problem. If any check fails, the exit code is non-zero.

CAVEATS

Some checks require network access. On restricted systems (CI, air-gapped), registry connectivity checks will fail. Cache verification can be slow on large caches.

SEE ALSO

Copied to clipboard
Kai