Skip to content

TypeError: jsons.map is not a function #1802

@hypo-thesis

Description

@hypo-thesis

I am trying to pop an element from an array as such

{foo : [ { 'qux' : '1'} , {'bar' : '2'} ] }

via

Client.json.ARRPOP(foo, '.', 1)

however I get the error :

F:\vite-multiple-chat\backendofmultiplchat\node_modules\.pnpm\@node-redis+json@1.0.1_@node-redis+client@1.0.1\node_modules\@node-redis\json\dist\commands\index.js:87
    return jsons.map(transformRedisJsonNullReply);
                 ^

TypeError: jsons.map is not a function
    at Object.transformRedisJsonNullArrayNullReply (F:\vite-multiple-chat\backendofmultiplchat\node_modules\.pnpm\@node-redis+json@1.0.1_@node-redis+client@1.0.1\node_modules\@node-redis\json\dist\commands\index.js:87:18)
    at transformCommandReply (F:\vite-multiple-chat\backendofmultiplchat\node_modules\.pnpm\@node-redis+client@1.0.1\node_modules\@node-redis\client\dist\lib\commander.js:100:20)
    at Commander.commandsExecutor (F:\vite-multiple-chat\backendofmultiplchat\node_modules\.pnpm\@node-redis+client@1.0.1\node_modules\@node-redis\client\dist\lib\client\index.js:160:54)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

Node.js v17.3.0

I am not sure what to do at this point. I can pop the array from CLI but no luck in node.
Please help me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions