I am using highland. In my project, I have replaced the native promise implementation with bluebird. Now, my application produces a lot of warnings, by spamming the console with:
(node:1503) Warning: a promise was created in a handler at usr/src/marketing-tasks/node_modules/highland/lib/index.js:517:24 but was not returned from it, see http://goo gl/rRqMUw
at new Promise (/usr/src/marketing-tasks/node_modules/bluebird/js/release/promise.js:77:14)
I am aware there might be a problem that should be solved, yet currently my streams work as expected. So for now, whenever I call my script via either node
or nodemon
, I just want to not have these warnings in my output.
How to not show certain warnings when running node?
I also created an issue on github and there it was explicated that the warning was a false positive, it has been handled nontheless. Updating to highland to v2.10.2 should also the issue without having to disable bluebird's warning entirely.
Bluebird warning logging can be modified at different places via environment variables.
There are multiple that can enable it, e.g. via:
NODE_ENV='development'
which is the case on my development stack.
In order to explicitly deactivate that warning I set:
BLUEBIRD_WARNINGS=0