Repository navigation
TypeError: Cannot call method 'map' of undefined #424
Copy link
Copy link
Closed
Labels
🚨This issue needs some love.This issue needs some love.api: datastoreIssues related to the Datastore API.Issues related to the Datastore API.triage meI really want to be triaged.I really want to be triaged.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Milestone
Description
Activity
This looks like code that the google-apis library expects (@ryanseys?)
This same thing in our library should look something like:
'use strict'; console.log('Entered app'); var gcloud = require('gcloud'); console.log('Imported gcloud'); var db = gcloud.datastore.dataset({ projectId: "<my actual project ID>" }); var phone = '000000'; var userExistenceCheckQuery = db .createQuery('User') .filter('phone =', phone); db.runQuery(userExistenceCheckQuery, function(err, result) { if(err) {console.log(JSON.stringify(err, null, ' '));} else {console.log(JSON.stringify(result, null, ' '));} });
Feel free to re-open if you have any issues with our API. (Docs here: https://googlecloudplatform.github.io/gcloud-node/#/docs/v0.12.0/datastore/query)
Yeah the generic library (
google-api-nodejs-client) accepts this more generic form of a query object. Withingcloud-nodewe try to maintain a more idiomatic approach which is the reason for the more simplified and understandable api. Hope you find you like it more than the generic library! :)- addedtype: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.api: datastoreIssues related to the Datastore API.Issues related to the Datastore API.
on May 14, 2015 - added🚨This issue needs some love.This issue needs some love.triage meI really want to be triaged.I really want to be triaged.
on Apr 6, 2020 - added a commit that references this issue
on Sep 15, 2022 - added 2 commits that reference this issue
on Nov 9, 2022 8 remaining items
- added a commit that references this issue
on Feb 2, 2026 - added a commit that references this issue
on Feb 3, 2026 - added a commit that references this issue
on Feb 23, 2026 - added a commit that references this issue
on Feb 25, 2026 - added a commit that references this issue
on Feb 26, 2026 - added a commit that references this issue
on Mar 18, 2026
Metadata
Metadata
Assignees
Labels
🚨This issue needs some love.This issue needs some love.api: datastoreIssues related to the Datastore API.Issues related to the Datastore API.triage meI really want to be triaged.I really want to be triaged.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
I setup an instance of type f1-micro in us-central1-f data center (machine type Ivy Bridge) running CentOS 7 to test some of my queries on as I plan to use google datastore as the backend db for a project.
The other details are that I enabled datastore service both for the project and for the instance while creating it.
Ran the following commands to update the system and get node running:
Dumped the following code into app.js:
Output:
Other relevant information:
node.js version is v0.10.33
Is there something I am doing wrong or is this a bug in the library ?