Cannot set property closed of #<Readable> which has only a getter in NodeJS v18.0.0
See original GitHub issueNodeJS 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;
};
Issue Analytics
- State:
- Created a year ago
- Reactions:5
- Comments:5 (2 by maintainers)
Top Results From Across the Web
TypeError: Cannot set Property which has only a Getter in JS
The "Cannot set property which has only a getter" error occurs when trying to set a new value to a property, for which...
Read more >node v18 crashes with audio src · Issue #5055 · aframevr/aframe
I'm building a Vue 3 app and HTML audio tag crashes the app. TypeError: Cannot set property closed of #< Readable > which...
Read more >set - property closed of - #<Readable> which has only a getter
NodeJS v18.0.0 TypeError: Cannot set property closed of #<Readable> which has only a getter at FsReadStream.close ...
Read more >Cannot Set Property ... Which Only Has Getter (javascript es6)
If you want an instance property to be read-only, then make it not writable: class MyClass { constructor(x) { Object.
Read more >Stream | Node.js v19.3.0 Documentation
Readable streams use the EventEmitter API for notifying application code when data is available to be read off the stream. That available data...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Same bugs
Awesome thanks - I’ve got merge powers so will take a look tomorrow morning.