stackvana / microcule

SDK and CLI for spawning streaming stateless HTTP microservices in multiple programming languages
Other
480 stars 29 forks source link

DeprecationWarnings are written out on the console #35

Open mikaelkaron opened 7 years ago

mikaelkaron commented 7 years ago

When running a hook with deprecated api usage you can see:

(node:13604) DeprecationWarning: Using Buffer without `new` will soon stop working. Use `new Buffer()`, or preferably `Buffer.from()`,
 `Buffer.allocUnsafe()` or `Buffer.alloc()` instead.

if you try to use a package like trumpet things get even weirder.

Possible solutions would be to somehow set the process the same way as passing --no-deprecation in the cli, perhaps nodejs/node@c6656db352973d6aea24cb1a3c76adf042b25446 can shed some light on that.

Marak commented 7 years ago

Is this because the deprecation warnings are coming over STDERR? Or are they coming from STDOUT?

mikaelkaron commented 7 years ago

They are coming over STDERR from what I can see.

Marak commented 7 years ago

I'll merge this since it will fix the issue.

We may have to migrate the STDERR output code to STDIO 3.