This repository was archived by the owner on Apr 25, 2024. It is now read-only.
This repository was archived by the owner on Apr 25, 2024. It is now read-only.
Buffer() is deprecated #93
Open
Description
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.
Metadata
Metadata
Assignees
Labels
No labels