Skip to content
This repository has been archived by the owner on Apr 25, 2024. It is now read-only.

Buffer() is deprecated #93

Open
brendanjhoffman opened this issue Sep 27, 2023 · 0 comments
Open

Buffer() is deprecated #93

brendanjhoffman opened this issue Sep 27, 2023 · 0 comments

Comments

@brendanjhoffman
Copy link

Making a request shows console error (node:2036) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
Buffer() is being used on shippo\lib\Resource.js:183 - var requestData = new Buffer(JSON.stringify(data || {})); Changing the line to var requestData = Buffer.alloc(JSON.stringify(data || {})); makes the error go away.

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

No branches or pull requests

1 participant