lambda-multipart-parser icon indicating copy to clipboard operation
lambda-multipart-parser copied to clipboard

DeprecationWarning: Buffer() (Use Buffer.from instead?)

Open oakleaf opened this issue 2 years ago • 2 comments

Hello and thank you for this minimal and smart repo!

Anyway, I am given warnings about using Buffer instead of Buffer.from with my Node 18 Lambda application.

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

Im guessing it could have to do with busboy or something since your lib doesnt even include "Buffer" at all (from what I can see).

A fix to this would be appreciated 👍

oakleaf avatar Feb 25 '23 09:02 oakleaf

I encountered the same issue... have published a revised version here using the PR opened by jrose-stac. Take no credit for the changes, simply published a new package as I needed it for a project. Solved the issue for me, hope it helps.

solarii85 avatar Feb 28 '24 16:02 solarii85

Same warning...

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

hpardess avatar May 04 '24 00:05 hpardess