Log Levels of NPM | Generated by AI
NPM (Node Package Manager) provides several log levels that control the verbosity of output when running npm commands. Here they are, from least to most verbose:
- silent: Shows no output
- error: Only shows errors (default)
- warn: Shows errors and warnings
- notice: Shows errors, warnings, and notices
- http: Shows HTTP requests
- timing: Shows timing information
- info: Shows information messages
- verbose: Shows detailed information
- silly: Shows all debug information
You can set the log level using the --loglevel
flag or the npm_config_loglevel
environment variable:
npm install --loglevel verbose
Or you can set it in your npm configuration:
npm config set loglevel verbose
The default log level is “error” for most commands, meaning you’ll only see error messages unless you specifically request more verbose output.