npm loglevel should be left as default · Issue #528 · nodejs/docker-node (original) (raw)
There are a long list of arguments why docker shouldn't be changing npm's default and a lot of vocal support for removing the verbose setting. Now that it's been over a year since this was last discussed, I would like to reopen the discussion to consider returning to npm's default.
- conflicting with npm's own default setting is jarring and violates principle of least surprise
warn
already prints (typically) enough info during a failure case. the scenarios whereinfo
is actually necessary to debug a failure are vanishingly slim. indeed, failures themselves are the exception, soinfo
is necessary in a fraction of a fraction of cases- the env var can't be overridden with .npmrc or
npm config set
because env vars take precedence. thus the only way to get back to npm's default is to set our own env var
-the vast majority of people are now forced to manually undo a setting for the tiny percentage that want it to be different than npm's default
And most importantly, contrary to the documented rationale for this setting:
- it's possible to get the full debug log during a failure without being overly verbose to
STDOUT
At the very least, this setting should not be set via environment variable, but rather via the builtin config file. $PREFIX/etc/npmrc
is specifically for distributions to customize defaults to their liking. Using this would allow users to force it back to npm's default using either user or project .npmrc
, instead of forcing users to override using env var or cli flag.