Please add the following line at the top of your file: Buffer.from = function(v) {return new Buffer(v)}; I think that should work.