diff --git a/lib/constructor.js b/lib/constructor.js index 711221f2..9299682e 100644 --- a/lib/constructor.js +++ b/lib/constructor.js @@ -288,7 +288,8 @@ const Sharp = function (input, options) { this.options.input = this._createInputDescriptor(input, options, { allowStream: true }); return this; }; -util.inherits(Sharp, stream.Duplex); +Object.setPrototypeOf(Sharp.prototype, stream.Duplex.prototype); +Object.setPrototypeOf(Sharp, stream.Duplex); /** * Take a "snapshot" of the Sharp instance, returning a new instance.