npm Community Forum (Archive)

The npm community forum has been discontinued.

To discuss usage of npm, visit the GitHub Support Community.

Suppressing `npm WARN npm npm does not support Node.js v12.0.0-pre`

Is there a way to suppress the npm WARN npm npm does not support Node.js v12.0.0-pre warning only (and allow all other warnings to be printed)? Looking quickly through docs and lib/utils/unsupported.js, it seems the answer is “no” but maybe I’m missing something? If not, would a pull request implementing such a thing be welcome or likely rejected?

The use case is running the npm tests while building Node.js from latest source. There is at least one npm test that checks that no warnings are printed, so it fails when we run it with latest source. It would be great if Node.js contributors didn’t have to know that some npm test failures are expected, and suppressing that warning seems like the most desirable of the possibilities I’ve managed to think of.

You should be able to suppress all warnings with --loglevel=error, but there’s no way to specifically suppress these warnings. Either way, are you running v6.5.0? There should be no warnings there since this commit.

The source tree has 6.5.0-next and doesn’t have that commit. Fortunately, there’s a pull request just about ready to land that will update it to 6.5.0. And with that commit, this becomes a non-issue. (I thought it would still trigger the warning because of the -pre in the Node.js version but nope, apparently not.)

So this is not a problem for the most part, I guess. Thanks!