Skip to content

josn.map is not a function with the CLI #59

@kqvanity

Description

@kqvanity

running claude --key raises the following error

(node:2610641) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
TypeError: json.map is not a function
    at Claude.getConversations (file:///home/keinvanity/.local/lib/node_modules/claude-cli/node_modules/claude-ai/index.js:298:21)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async Claude.init (file:///home/keinvanity/.local/lib/node_modules/claude-cli/node_modules/claud
e-ai/index.js:174:37)
    at async main (file:///home/keinvanity/.local/lib/node_modules/claude-cli/index.js:124:5)

and running via the library raises another error

file:///home/keinvanity/Downloads/claude-misc/Explosion-Scratch-claude-unofficial-api/node_modules/claude-ai/index.js:171
            throw new Error(JSON.stringify(organizations, null, 2))
                  ^

Error: {
  "error": {
    "message": "We are unable to serve your request",
    "type": "permission_error"
  }
}
    at Claude.init (file:///home/keinvanity/Downloads/claude-misc/Explosion-Scratch-claude-unofficial-api/node_modules/claude-ai/index.js:171:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async file:///home/keinvanity/Downloads/claude-misc/Explosion-Scratch-claude-unofficial-api/main.js:7:1

Node.js v22.9.0

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