在 npm 中禁用警告 and/or 错误

Disable WARNs and/or ERRORs in npm

npm 安装时抛出 errorswarnings

如何禁用一个或两个?

要禁用这些日志类型,您需要将参数附加到 npm install 命令。

禁用警告

WARNs只能通过在命令中添加--loglevel=error来禁用。

npm install --loglevel=error

禁用警告和错误

WARNsERRs 可以通过在命令中添加 --silent 来禁用。

npm install --silent