Skip to content

Cannot create a string longer than 0x1fffffe8 characters #156

@huksley

Description

@huksley

Running it in GitHub CI results in the following error:

Run vio/bundle-stats-action@v1
  with:
    id: bundle-stats-nodejs
    webpack-stats-path: .next/server/stats/webpack-nodejs-stats.json
    repo-token: ***
  env:
    MSYS: winsymlinks:nativestrict
Error: Cannot create a string longer than 0x1fffffe8 characters

I tried googling it and it related to out of memory error and JSON serialization/deserialization.

In my other project, using JSON.serialize() is an OOM,
so I was using

const { stringifyStream } = require("@discoveryjs/json-ext");

stringifyStream(stats.toJson(this.statsOptions))
        .on("end", () => callback())
        .on("error", e => callback(e))
        .pipe(fs.createWriteStream(file));

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions