Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DeprecationWarning: using Buffer without 'new' #1158

Closed
leroydev opened this issue Oct 27, 2016 · 9 comments
Closed

DeprecationWarning: using Buffer without 'new' #1158

leroydev opened this issue Oct 27, 2016 · 9 comments

Comments

@leroydev
Copy link

leroydev commented Oct 27, 2016

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!

@leroydev leroydev changed the title DeprecationWarning for using Buffer without 'new' DeprecationWarning: using Buffer without 'new' Oct 27, 2016
@brianc
Copy link
Owner

brianc commented Oct 31, 2016

I appreciate the report - it should be fixed soon!

@abduncan
Copy link

Did this ever get fixed?

@Zabanaa
Copy link

Zabanaa commented Nov 28, 2016

Still happening to me. I'm using node 7.1.0.

@leroydev
Copy link
Author

leroydev commented Nov 28, 2016

@abduncan Not yet, as far as I know. I don't know why this issue was closed.

@caycecollins
Copy link

#1163

@unstephenk
Copy link

Stil having issues with this...

@charmander
Copy link
Collaborator

charmander commented Dec 18, 2016

@Zabanaa @unstephenk Upgrade to Node 7.1.2 7.2.1.

@GastonRosso
Copy link

@charmander I'm on 7.2.0

@charmander
Copy link
Collaborator

@GastonRosso Sorry, that was a typo; upgrade to 7.2.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants