PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0
Showing posts with label nodemon. Show all posts
Showing posts with label nodemon. Show all posts

Thursday, April 28, 2022

[FIXED] How to supress certain warnings when running node / nodemon?

 April 28, 2022     bluebird, node.js, nodemon, output, warnings     No comments   

Issue

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?


Solution

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


Answered By - k0pernikus
Answer Checked By - Dawn Plyler (PHPFixing Volunteer)
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Older Posts Home

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
All Comments
Atom
All Comments

Copyright © PHPFixing