Skip to content

Conversion of big Turtle file failes with RangeError: Invalid string length #7

Description

@hexagon6

Using a very big ttl file (in my case 700MB) causes cli to fail when trying to convert lines.join("\n")

Steps to reproduce:

$ npx
$ ttl2jsonld esco.ttl > esco.jsonld
/home/redacted/project/node_modules/.pnpm/@frogcat+ttl2jsonld@0.0.10/node_modules/@frogcat/ttl2jsonld/bin/cli.js:16
  const turtle = lines.join("\n");
                       ^

RangeError: Invalid string length
    at Array.join (<anonymous>)
    at Interface.<anonymous> (/home/redacted/project/node_modules/.pnpm/@frogcat+ttl2jsonld@0.0.10/node_modules/@frogcat/ttl2jsonld/bin/cli.js:16:24)
    at Interface.emit (node:events:519:35)
    at Interface.close (node:internal/readline/interface:559:10)
    at ReadStream.onend (node:internal/readline/interface:273:10)
    at ReadStream.emit (node:events:507:28)
    at endReadableNT (node:internal/streams/readable:1701:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:90:21)

Node.js v24.2.0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions