Skip to content

Bug: ccusage crashes with Invalid String Length Error #703

Description

@haltingstate

We have an OSX dev box that is getting this error.

result += decoder.write(readBuffer);
RangeError: Invalid string length---

cusage


WARN Fetching latest model pricing from LiteLLM... ccusage 11:56:33 am

ℹ Loaded pricing for 1679 models ccusage 11:56:34 am
node:internal/fs/promises:594
result += decoder.write(readBuffer);
^
RangeError: Invalid string length
at readFileHandle (node:internal/fs/promises:594:25)
at async loadDailyUsageData (file:///opt/homebrew/lib/node_modules/ccusage/dist/data-loader-BGg_9orY.js:3557:19)
at async Object.run (file:///opt/homebrew/lib/node_modules/ccusage/dist/index.js:4506:21)
at async executeCommand (file:///opt/homebrew/lib/node_modules/ccusage/dist/index.js:881:2)
at async cli (file:///opt/homebrew/lib/node_modules/ccusage/dist/index.js:794:2)
at async run (file:///opt/homebrew/lib/node_modules/ccusage/dist/index.js:6391:2)
at async file:///opt/homebrew/lib/node_modules/ccusage/dist/index.js:6399:1

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions