Node-postgres: DeprecationWarning: Using Buffer without `new` will soon stop working.

Created on 2 Nov 2016  路  9Comments  路  Source: brianc/node-postgres

node v 7.0.0

Getting warning:

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

from these line

// lib/connection.js line: 299
var emptyBuffer = Buffer(0);

Most helpful comment

@TyrfingMjolnir
To avoid flood, you may use node with --no-warnings temporarily

All 9 comments

+1

+1

It's flooding my logs, how do I fix this?

@TyrfingMjolnir
To avoid flood, you may use node with --no-warnings temporarily

+1

@alpertuna thanks, it's work pending fix

It looks warning is over with Nodejs 7.2.1

@alpertuna Can confirm, thanks for the heads-up.

The warning is removed with Node 7.2.1, and some variant of #1154 should take care of the cause.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lucasmrl picture lucasmrl  路  3Comments

gregallenvt picture gregallenvt  路  3Comments

v1co1n picture v1co1n  路  4Comments

ClueLessEggHead picture ClueLessEggHead  路  3Comments

chovy picture chovy  路  3Comments