Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Hide non-fatal errors, warnings, and build information unless running with the debug flag #3270

balupton opened this Issue · 5 comments

6 participants



mkdir test
cd test
npm install iconv

Is an extremely scary and confusing experience for people who don't know that NPM is like the guest at the party that can puke all over the place, but still survive to live the next day.

For DocPad, one of our target audiences is people inexperienced to node, and as npm install shows all these warnings, non-fatal errors, and the build information - we get contacted each week with people freaking out, and then us having to say, "did you try running docpad anyway? most errors are non fatal and docpad should still work fine" - we've actually had to add that line to our install instructions to try and counter this.

This makes me wonder how much information we are over-exposing to the user? Perhaps, like myself, they really don't care for all these warnings, non-fatal errors, and build information unless they explicitly want it with the -d flag?


There are quite a few log levels to choose from. If you have inexperienced users, then one would assume that you would provide them with a script, rather than have them type everything by hand, so why not just include a setting in that script to set the log level to the level you prefer? Your choices are:

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

with the default being 'http'.


It looks like you're saying that build info should not be displayed unless the build fails. However, what about cases where the build outputs something that IS important? I'm not comfortable hiding this entirely. Often that output is extremely useful. However, perhaps we could make it suppressed if you set loglevel=silent.

Better yet, you could have the DocPad build output something that is less frightening by fixing the warnings in iconv.

@isaacs isaacs closed this
@isaacs isaacs reopened this

Cool, will look into the suggestions provided. Thanks :)


There is a related issue here: #5809

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.