max-mapper / max-mapper/byte-stream

Invalid non-string/buffer chunk

Open
#8 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
22
Forks
5
PR merge metrics
No merged PRs in 30d

Description

Am I doing something wrong in below example?

let { Writable } = require("stream");
let fs = require("fs");
var batcher = require('byte-stream');


let input = fs.createReadStream("./test-file");

let batchedStream = batcher({time:1000, limit:100})

let output = new Writable({
    write: function writeImplementation(chunk, encoding, callback) {
        console.log(`      OUTPUT:  "${chunk.toString().replace("\n", "\\n")}"`);
    }
});


input
    .pipe(batchedStream)
    .pipe(output);

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the reported pipeline using the JavaScript example, fs.createReadStream, test-file, byte-stream, and Writable. Inspect how the batched stream passes chunks to the Writable and define done as the example completing without an invalid non-string/buffer chunk error.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.