Skip to content

DeprecationWarning: using Buffer without 'new' #1158

Closed
@leroydev

Description

@leroydev

In Node.js v7.x (which is nowadays the 'current' Node.js branch), a DeprecationWarning is shown because of line 299 of connection.js.

Not a huge problem for now, but would be nice to get rid off I think. :)

Stacktrace:

DeprecationWarning: Using Buffer without `new` will soon stop working. Use `new Buffer()`, or preferably `Buffer.from()`, `Buffer.allocUnsafe()` or `Buffer.alloc()` instead.
    at Buffer (buffer.js:79:13)
    at Object.<anonymous> (C:\project\node_modules\pg\lib\connection.js:299:19)

Edit: looks like this is already getting fixed by either #1156 or #1154, my bad!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions