(node:3872) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issue
Nodejs 生成验证码的时候遇到这个问题 查询了半天
发现在新的nodejs 版本中 不在使用 new Buffer();
var imgbase64 = new Buffer(img,'base64');
而是使用 new buffer.from()
var imgbase64 = new Buffer.from(img,'base64');
运行后 问题解决