francismeynard / lambda-multipart-parser

This nodejs module will parse the multipart-form containing files and fields from the AWS lambda event object. It works very well parsing binary and text files.
MIT License
67 stars 25 forks source link

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

Open oakleaf opened 1 year ago

oakleaf commented 1 year ago

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 👍

solarii85 commented 6 months ago

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.

hpardess commented 4 months ago

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)