hprose/hprose-nodejs

使用hprose报错,源码中使用了废弃的api

YuetTusi opened this issue · 1 comments

我的技术栈是React+Electron,在引入hprose后控制台报错误调用了new Buffer()这个已经废弃的api,建议改为Buffer.alloc(),请问这个问题如何解决?

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

你用 TypeScript 版本试试,那个比较新。