Skip to content

Analyze error: "Failed to run publint: ... stderr maxBuffer length exceeded" #196

@fountain-draloff

Description

@fountain-draloff

What's happening?

I'm running npx @e18e/cli analyze in a largish private typescript monorepo (1.65M lines TS/JS according to cloc, package-lock.json is 4.5MB, 59 npm workspaces).

After "Analyzing..." for ~45s, I get an error: Failed to run publint: RangeError [ERR_CHILD_PROCESS_STDIO_MAXBUFFER]: stderr maxBuffer length exceeded. This does not appear to halt the process, and we keep running until we hit a subsequent error maybe ~10s later: TypeError [ERR_INVALID_ARG_TYPE]: The "text" argument must be of type string. Received undefined.

Following along in htop it appears that analyze is running npm pack during the majority of the "Analyzing..." time. Running npm pack myself produces a tarball weighing in at 177MB.

Demographic info

OS: macOS Sequoia 15.7.3 (24G419)
Processor: M1 Pro 2021
RAM: 32GB
JS Runtime: node.js v22.19.0
npm version: v10.8.2
@e18e/cli version: v0.5.0

Shell output

npx @e18e/cli analyze --log-level debug
e18e (cli v0.5.0)

┌  Analyzing...
Failed to run publint: RangeError [ERR_CHILD_PROCESS_STDIO_MAXBUFFER]: stderr maxBuffer length exceeded
node:util:240
  validateString(text, 'text');
  ^

TypeError [ERR_INVALID_ARG_TYPE]: The "text" argument must be of type string. Received undefined
    at styleText (node:util:240:3)
    at exportOutput (file:///Users/danraloff/.npm/_npx/681c05615ff114c6/node_modules/@e18e/cli/lib/analyze/duplicate-dependencies.js:98:29)
    at runDuplicateDependencyAnalysis (file:///Users/danraloff/.npm/_npx/681c05615ff114c6/node_modules/@e18e/cli/lib/analyze/duplicate-dependencies.js:14:12)
    at async runPlugins (file:///Users/danraloff/.npm/_npx/681c05615ff114c6/node_modules/@e18e/cli/lib/plugin-runner.js:28:21)
    at async report (file:///Users/danraloff/.npm/_npx/681c05615ff114c6/node_modules/@e18e/cli/lib/analyze/report.js:75:5)
    at async run (file:///Users/danraloff/.npm/_npx/681c05615ff114c6/node_modules/@e18e/cli/lib/commands/analyze.js:63:33)
    at async executeCommand (file:///Users/danraloff/.npm/_npx/681c05615ff114c6/node_modules/gunshi/lib/core-BabkHGNU.js:884:18)
    at async cliCore (file:///Users/danraloff/.npm/_npx/681c05615ff114c6/node_modules/gunshi/lib/core-BabkHGNU.js:697:9) {
  code: 'ERR_INVALID_ARG_TYPE'
}

Node.js v22.19.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions