diff --git a/lib/internal/fs/utils.js b/lib/internal/fs/utils.js index 24d946edf7288a..e91918a00772cf 100644 --- a/lib/internal/fs/utils.js +++ b/lib/internal/fs/utils.js @@ -345,6 +345,10 @@ function Stats(dev, mode, nlink, uid, gid, rdev, blksize, Object.setPrototypeOf(Stats.prototype, StatsBase.prototype); Object.setPrototypeOf(Stats, StatsBase); +// HACK: Workaround for https://github.com/standard-things/esm/issues/821. +// TODO(ronag): Remove this as soon as `esm` publishes a fixed version. +Stats.prototype.isFile = StatsBase.prototype.isFile; + Stats.prototype._checkModeProperty = function(property) { if (isWindows && (property === S_IFIFO || property === S_IFBLK || property === S_IFSOCK)) {