529847 (2) [Avatar] Offline
#1
I am trying to run the code in Listing 5.13. - "Query Cloud Datastore for all TodoList entities". I get the following error while running the code,

TypeError: datastore.runQuery(...).on is not a function
at Object.<anonymous> (/home/talk2bcs/gcp_inaction/chap5/script.js:8:4)
at Module._compile (module.js:624:30)
at Object.Module._extensions..js (module.js:635:10)

I am quite new to node.js. I did run the npm install command to install the required modules. Can someone please help. Thanks in advance.
JJ Geewax (20) [Avatar] Offline
#2
It looks like this was an error on my part with the correct version number. Try using version 0.4.0 of the Datastore client? (e.g., npm install @google-cloud/datastore@0.4.0)

In the meantime I'll see about updating code snippets to use a more recent version of the client.
529847 (2) [Avatar] Offline
#3
Thanks for the quick response!! This works.