All Questions
308
questions
0
votes
0
answers
26
views
Node.js: Pipe data parsed from "zlib.createGunZip" and "tar.extract" to custom transform function
I am using packages "tar-stream" and "zlib" to extract files from a TGZ file.
Is there a way to send data to a custom Transform function ?
"tarStream.extract()" doesn't ...
0
votes
0
answers
27
views
How to combine child_process.spawn output with async pipeline while handling errors?
How to combine child_process.spawn output with async pipeline while handling errors?
const fs = require('fs');
const { pipeline }= require('stream/promises');
const { spawn } = require("...
0
votes
0
answers
78
views
Avoid backpressure in writing to NodeCSV stringify stream with async/await
How do I ensure that an output stream doesn't overflow when writing to a stream in an async/await?
Here I'm writing an array of objects as a CSV file using NodeCSV (https://github.com/adaltas/node-csv)...
2
votes
1
answer
178
views
Pipe video frames from ffmpeg to canvas without loading the entire video into memory
I am working on a project that involves frame manipulation and I decided to choose node canvas API for that. I used to work with OpenCV Python and there was a cv2.VideoCapture class that takes a video ...
0
votes
0
answers
36
views
papparse how do I manage errors and retrieve meta information while pipeling?
I am parsing a CSV file using papparse streaming feature
import fs from 'node:fs'
import papa from "papaparse"
const reader = fs.createReadStream(csvPath)
.pipe(something)...
0
votes
0
answers
15
views
share internet as client to other client by intermediary server in nodejs net module
Suppose we have cloud server as intermediary server and we have two client.
client2 want to use client1's internet through cloud intermediary server, both client does not have public IP.
client2 will ...
1
vote
2
answers
55
views
Building CLI tool in nodejs, child process output is not seen
I am Building a command line tool in node, and as part of this tool I need to execute commands that I have in my system.
The problem is that I don't get the piped output from the child process that I ...
0
votes
0
answers
11
views
Multi streamin from a single stream NODE.JS
`
*The code works, it takes the stream from an external source and sends it to multiple users connected at the same time.
The external server accepts a single request, so I can't create a fetch() for ...
0
votes
0
answers
44
views
Nodejs(v18) streming pipe
I need to stream a big video from an Amazon S3 bucket. Streming works fine when the user doesn't scrumble the video, but when the user scrumbles the video from 0:20 sec to example 1:00 I get an ...
0
votes
1
answer
171
views
How to jest test (Body as any).pipe(zlib.createGunzip())?
I have been working on creating a unit test to test my import function implementation, but I can't get to pass from the .pipe() line. Here are some of my function lines for more context:
const { ...
1
vote
1
answer
177
views
Node CLI program writeFileSync gets "EAGAIN" error when output redirected to a pipe
I've got a simple Node program used from the command line for testing an external API. The tool works in general: it makes an API call as per command line arguments and flags, does minor processing on ...
0
votes
1
answer
315
views
Pipe stream with a delay without loosing data
I try to pipe streams with a "delay".
The problem is, as soon as the input stream receives data, and the pipeing is done, the data is lost and nothing received on the output stream.
const { ...
0
votes
1
answer
381
views
Node child_process can't pipe stdout when the child process gets aborted
I want to compile code (pawn language), pipe all the compiler output, and then match all diagnostics using regex.
The thing is, for some reason, the compiler sometimes crashes with this error:
...
0
votes
0
answers
580
views
Node readableStream that uses pipe needs a _read() method?
The following code is what I got from a tutorial page on Node Stream as a working example:
const Stream = require('stream')
const readableStream = new Stream.Readable()
const writableStream = new ...
0
votes
1
answer
488
views
NodeJS flush function streams not working
I have this main file, with the goal to output the sum of profits for a country
const { createReadStream } = require("fs");
const parse = require("csv-parse");
const csv = require(&...