消除 npm “可用更新"信息 [英] Eliminate npm "update available" message

查看:56
本文介绍了消除 npm “可用更新"信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

现在似乎有更新的 npm 版本:

It seems that more recent versions of npm now produce:

我依靠我的 Linux (Ubuntu) 包管理器来决定何时更新 node 和 npm.有没有办法关闭此检查?

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 似乎与此无关,并且在我的主目录中的 .npm 中似乎没有首选项文件.

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:

npm config set update-notifier false

正如 Dem Pilafian 提到的 - 它会将 update-notifier=false 添加到 ~/.npmrc

As Dem Pilafian mentioned - it will add update-notifier=false to ~/.npmrc

要查看当前值,您需要此行

To see the current value you need this line

npm config get update-notifier

在此处阅读有关 npm 配置的更多信息https://docs.npmjs.com/cli/config

Read more about npm config here https://docs.npmjs.com/cli/config

这篇关于消除 npm “可用更新"信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆