Skip to content

RDDT0002: JSON Parse Stream Bad Line

Package: @vitejs/devtools-rolldown

Message

JSON parse stream skip bad line {line}:

Cause

Rolldown writes its build logs as newline-delimited JSON (NDJSON). When the devtools plugin reads these files, it parses each line individually using JSON.parse. If a line cannot be parsed as valid JSON, this warning is emitted and the line is skipped.

Common reasons a line might fail to parse:

  • The log file was truncated during a crash or interrupted build.
  • The file was corrupted by concurrent writes or disk issues.
  • A non-JSON line (such as a trailing newline or debug output) was written into the log file.

The warning includes the line number, the parse error message, and a preview of the offending line (truncated to 256 characters) to help diagnose the issue.

Fix

This warning is non-fatal -- the bad line is skipped and processing continues with the remaining lines. If you see this warning frequently or for many lines:

  1. Delete the node_modules/.rolldown/ directory.
  2. Run a clean build to regenerate the log files.
  3. If the problem persists, check that no other process is writing to the .rolldown directory concurrently.

Source

packages/rolldown/src/node/utils/json-parse-stream.ts

Released under the MIT License.