Cannot set property closed of #<Readable> which has only a getter in NodeJS v18.0.0
Closed this issue ยท 5 comments
ShenHongFei commented
NodeJS v18.0.0
TypeError: Cannot set property closed of #<Readable> which has only a getter
at FsReadStream.close (d:\0\node_modules\memfs\lib\volume.js:2047:17)
at FsReadStream._destroy (d:\0\node_modules\memfs\lib\volume.js:2032:10)
at _destroy (node:internal/streams/destroy:109:10)
at class_1.destroy (node:internal/streams/destroy:71:5)
at class_1.<anonymous> (d:\0\node_modules\memfs\lib\volume.js:1962:22)
at class_1.emit (node:events:539:35)
at class_1.emit (node:domain:475:12)
at endReadableNT (node:internal/streams/readable:1344:12)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
caused by this.closed = true
in node_modules/memfs/lib/volume.js
FsReadStream.prototype.close = function (cb) {
var _this = this;
if (cb)
this.once('close', cb);
if (this.closed || typeof this.fd !== 'number') {
if (typeof this.fd !== 'number') {
this.once('open', closeOnOpen);
return;
}
return process_1.default.nextTick(function () { return _this.emit('close'); });
}
this.closed = true;
this._vol.close(this.fd, function (er) {
if (er)
_this.emit('error', er);
else
_this.emit('close');
});
this.fd = null;
};
nuintun commented
G-Rath commented
Pull requests are welcomed ๐
dsokal commented
G-Rath commented
Awesome thanks - I've got merge powers so will take a look tomorrow morning.
streamich commented
๐ This issue has been resolved in version 3.4.2 ๐
The release is available on:
Your semantic-release bot ๐ฆ๐