But when the stream ends I get the error MinigetError: Status code: 404.
This is quite logical. However, I want to do stream.end() when the stream ends.
I tried this but was unsuccessful.
events.js:292
throw er; // Unhandled 'error' event
^
MinigetError: Status code: 404
at ClientRequest.<anonymous> (C:\Users\halisycel\Desktop\deneme\node_modules\miniget\dist\index.js:210:27)
at Object.onceWrapper (events.js:422:26)
at ClientRequest.emit (events.js:315:20)
at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:641:27)
at HTTPParser.parserOnHeadersComplete (_http_common.js:126:17)
at TLSSocket.socketOnData (_http_client.js:509:22)
at TLSSocket.emit (events.js:315:20)
at addChunk (internal/streams/readable.js:309:12)
at readableAddChunk (internal/streams/readable.js:284:9)
at TLSSocket.Readable.push (internal/streams/readable.js:223:10)
Emitted 'error' event on PassThrough instance at:
at PassThrough.onError (C:\Users\halisycel\Desktop\deneme\node_modules\m3u8stream\dist\index.js:73:16)
at PassThrough.emit (events.js:315:20)
at ClientRequest.<anonymous> (C:\Users\halisycel\Desktop\deneme\node_modules\miniget\dist\index.js:215:28)
at Object.onceWrapper (events.js:422:26)
[... lines matching original stack trace ...]
at addChunk (internal/streams/readable.js:309:12) {
statusCode: 404
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! deneme@1.0.0 start: `node index.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the deneme@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\halisycel\AppData\Roaming\npm-cache\_logs\2021-06-07T17_53_39_113Z-debug.log
I have a code like this
But when the stream ends I get the error
MinigetError: Status code: 404
. This is quite logical. However, I want to dostream.end()
when the stream ends. I tried this but was unsuccessful.here is the whole error