pushrax / node-rcon

A generic RCON protocol client for node.js
MIT License
133 stars 31 forks source link

Buffer Error #36

Closed ZariZaryab closed 2 years ago

ZariZaryab commented 2 years ago

(node:9308) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.

Any fix for this error?

pushrax commented 2 years ago

This isn’t an error. It’s a message indicating that the generic Buffer constructor is deprecated due to being easy to use wrong, and will eventually be removed. See https://nodejs.org/api/deprecations.html#DEP0005

I’ve updated the code to use Buffer.alloc, which is the equivalent replacement.