Leonidas-from-XIV / node-xml2js

XML to JavaScript object converter.
MIT License
4.88k stars 602 forks source link

xml2js is not compatible with node.js v10 #533

Closed manishaa603 closed 4 years ago

manishaa603 commented 4 years ago

Hi,

i am using xml2js to convert XML data to JSON, i am getting following error "DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead."

Note: When i use it for Node.js v8 and below everything works fine, but it breaks only when i switch to v10.

can you please suggest some workaround.

knoxcard commented 4 years ago

Appears to be a straightforward fix... https://stackoverflow.com/questions/52165333/deprecationwarning-buffer-is-deprecated-due-to-security-and-usability-issues

@Leonidas-from-XIV

knoxcard commented 4 years ago

Did a global search on the xml2js codebase, couldn't find a single instance of new Buffer or new Buffer()

@manishaa603 - can you post your xml2js code here? Trying to determine if this error is being derived from xml2js or your own codebase.

Leonidas-from-XIV commented 4 years ago

This seems to be an issue that only the original poster has run into and not reported since. The reporter has not come back on this, so I'm going to close this for now since it is unreproducible.