Skip to content

Error resultsing from GET request: #13

leejsinclair opened this Issue Apr 4, 2011 · 3 comments

2 participants


I might be coming from a position of ignorance as this is a second attempt as getting a nodejs project up and running. But is have followed the instructions provided within the text file.

As far as i know i have jade, express and mongo npm packages installed. And within the folder /usr/local/lib/node/.npm/mongodb-rest/active/node_modules they all appear within their respective folders.

The service works fine expect when attempting to retrieve a specific record using the uri structure:, in my case: In which case the follow error occurs:

TypeError: undefined is not a function
at Object. (/usr/local/lib/node/.npm/mongodb-rest/0.6.7/package/lib/rest.js:22:21)
at param (/usr/local/lib/node/.npm/connect/1.2.1/package/lib/middleware/router.js:148:21)
at param (/usr/local/lib/node/.npm/connect/1.2.1/package/lib/middleware/router.js:159:15)
at param (/usr/local/lib/node/.npm/connect/1.2.1/package/lib/middleware/router.js:159:15)
at param (/usr/local/lib/node/.npm/connect/1.2.1/package/lib/middleware/router.js:159:15)
at pass (/usr/local/lib/node/.npm/connect/1.2.1/package/lib/middleware/router.js:164:10)
at Object.router as handle
at next (/usr/local/lib/node/.npm/connect/1.2.1/package/lib/http.js:204:15)
at Object.logger as handle

I have investigated the line error number:
query = {'_id': new mongo.ObjectID(};

The parameter seems to be set.

Whereas sending a query URL request like '?query={"accountid":"myaccountID"}' works just fine.

i rolled back from node 0.5.0-pre to node 0.4.5 (node --version), as far as i can tell here are the .npm package versions:

  • connect@1.2.1
  • connect-mongodb@1.2.1
  • express@2.2.0
  • jade@0.1.3
  • mongodb@0.9.2
  • mongodb-rest@0.6.7

Platform Ubuntu 10.10

Any ideas?

tdegrunt commented Apr 4, 2011

Version bump, closed by a096343

@tdegrunt tdegrunt closed this Apr 4, 2011
tdegrunt commented Apr 4, 2011

Hi there,

Wouldn't worry about it, it's not you! It's just that node.js is moving quickly and I refuse to specify the exact versions of dependencies which is needed for which version of mongodb-rest, I just mention the minimum versions.

My code wasn't suitable for a later mongodb package, 0.6.8 should fix this.



Thanks so much,

Upgrading to 0.6.8 worked.

Sounds like your on the bleeding edge, good work guys.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.