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


(Rich Trott) #1

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.


(Lars Willighagen) #2

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.


(Rich Trott) #3

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!


(system) #4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.