简体   繁体   中英

React js Project - node:events: throw er; //Unhandled 'error' event

node:events:491
      throw er; // Unhandled 'error' event
      ^

TypeError: Cannot set property closed of #<Readable> which has only a getter
    at FsReadStream.close (/app/node_modules/memfs/lib/volume.js:2047:17)
    at FsReadStream._destroy (/app/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> (/app/node_modules/memfs/lib/volume.js:1962:22)
    at class_1.emit (node:events:525:35)
    at endReadableNT (node:internal/streams/readable:1359:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
Emitted 'error' event on class_1 instance at:
    at emitErrorNT (node:internal/streams/destroy:151:8)
    at emitErrorCloseNT (node:internal/streams/destroy:116:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)

Node.js v18.9.0

I double checked try catch block all over the project where promises used. Added Error Bounderies to solve this issue but still my server crashed on this error.

I have faced the same issue.

nmp i memfs@latest

Resolved my issue.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM