jaimeadf / discord-screenshot

A resource for FiveM that captures the screen of a player and uploads it to a discord webhook.
MIT License
69 stars 24 forks source link

DeprecationWarning #25

Open VIRUXE opened 2 years ago

VIRUXE commented 2 years ago

Happens the first time you take a screenshot.

(node:824) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead. (Use FXServer --trace-deprecation ... to show where the warning was created)

supermanBH commented 2 years ago

Happens the first time you take a screenshot.

(node:824) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead. (Use FXServer --trace-deprecation ... to show where the warning was created)

Go to dist folder edit server.js Search : new Buffer(0) Replace with : Buffer.allocUnsafe(0)

tugapower0 commented 1 year ago

Happens the first time you take a screenshot. (node:824) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead. (Use FXServer --trace-deprecation ... to show where the warning was created)

Go to dist folder edit server.js Search : new Buffer(0) Replace with : Buffer.allocUnsafe(0)

Having the same issue, but searching for that does not retrieve nothing. imagem

tugapower0 commented 1 year ago

Did found this one: a.getBuffer()

No idea if its that we must change to make the warning go away.