Skip to content
Advertisement

How to suppress npm WARN deprecated messages in bash

I have several version of node.js installed in Linux Mint 18.0. I manage them using nvm. Because of a project dependency, I need to have version 0.10 as the default version (nvm use 0.10). As a result of this, every time I start my terminal, I get the following output:

JavaScript

How do I suppress these messages?

Advertisement

Answer

You can suppress or quieten NPM via an environment variable:

JavaScript

This should work in your .bashrc (or wherever you invoke nvm):

JavaScript

Or you can set the environment variable globally

JavaScript

Different loglevels can be found here – they are:

“silent”, “error”, “warn”, “http”, “info”, “verbose”, “silly”

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement