question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot set property closed of #<Readable> which has only a getter in NodeJS v18.0.0

See original GitHub issue

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;
};

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:5
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
nuintuncommented, Apr 24, 2022

Same bugs Suggestion

1reaction
G-Rathcommented, May 11, 2022

Awesome thanks - I’ve got merge powers so will take a look tomorrow morning.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found