Jonahss / ioredisgraph

Node.js client for RedisGraph, by wrapping ioredis module
ISC License
24 stars 8 forks source link

following the readme gets a type exception #2

Closed renewooller closed 5 years ago

renewooller commented 5 years ago

contents of ioredisgraph.js is cut and paste from the readme

node ioredisgraph.js 

(node:7686) UnhandledPromiseRejectionWarning: TypeError: result.map is not a function
    at resultSet.map (/Users/renewooller/software/mono/backend/nl-tune-yards/node_modules/ioredisgraph/index.js:28:25)
    at Array.map (<anonymous>)
    at /Users/renewooller/software/mono/backend/nl-tune-yards/node_modules/ioredisgraph/index.js:27:29
    at Command.transformReply (/Users/renewooller/software/mono/backend/nl-tune-yards/node_modules/ioredis/built/command.js:238:22)
    at Command.value [as resolve] (/Users/renewooller/software/mono/backend/nl-tune-yards/node_modules/ioredis/built/command.js:218:30)
    at DataHandler.returnReply (/Users/renewooller/software/mono/backend/nl-tune-yards/node_modules/ioredis/built/DataHandler.js:67:26)
    at JavascriptRedisParser.returnReply (/Users/renewooller/software/mono/backend/nl-tune-yards/node_modules/ioredis/built/DataHandler.js:21:22)
    at JavascriptRedisParser.execute (/Users/renewooller/software/mono/backend/nl-tune-yards/node_modules/ioredis/node_modules/redis-parser/lib/parser.js:544:14)
    at Socket.DataHandler.redis.stream.on.data (/Users/renewooller/software/mono/backend/nl-tune-yards/node_modules/ioredis/built/DataHandler.js:25:20)
    at Socket.emit (events.js:182:13)
(node:7686) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:7686) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
node --version
v10.9.0

output of redis monitor:

OK
1564965631.742714 [0 172.17.0.1:45284] "info"
1564965631.746975 [0 172.17.0.1:45284] "GRAPH.QUERY" "MotoGP" "CREATE (:Rider {name:'Valentino Rossi'})-[:rides]->(:Team {name:'Yamaha'}), (:Rider {name:'Dani Pedrosa'})-[:rides]->(:Team {name:'Honda'}), (:Rider {name:'Andrea Dovizioso'})-[:rides]->(:Team {name:'Ducati'})"
Jonahss commented 5 years ago

ah yes. You must be using the latest published docker image for redisgraph? They updated the syntax (but haven't officially released v2 yet).

npm install ioredisgraph@v2 to use the version of this library updated for the latest.

I ran into this two. I don't know why they released the new syntax in version 1.9. I guess I can just publish v2 as the default now.

Jonahss commented 5 years ago

v2 was published as a beta version, so you didnt get it by default. I have now published v2.0.1 as a main release.