It seems that more recent versions of npm now produce:
I rely on my Linux (Ubuntu) package manager to make decisions about when to update node and npm. Is there a way to turn this check off?
npm config ls -l
seems to have nothing related to this and in .npm
in my home dir there appears to be no preferences file.
To disable notifier just run:
As Dem Pilafian mentioned - it will add
update-notifier=false
to~/.npmrc
To see the current value you need this line
Read more about npm config here https://docs.npmjs.com/cli/config
This was annoying me as well, but there's absolutely no information about it anywhere.
Looking through the code, I've found that the update-notifier-module used by npm has actually a couple of ways to turn it off.
The best one is probably the special config-file located at
~/.config/configstore/update-notifier-npm.json
(just search forupdate-notifier-npm.json
). Inside it, simply set "optOut" to true.The other ways to disable it would be setting an environment-variable called "NO_UPDATE_NOTIFIER" or using the argument "--no-update-notifier"
if you are to parse the npm command output, one option is to format the output, such as "--json true", "npm list --json true", npm will honour the argument and hide the upgrade message.
update-notifier=false
in
.npmrc
file seems to do the trick since NPM v6.2.0-next.0 (2018-06-28).