Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with node-mongodb-native V1.3.20 #105

Closed
paulfryzel opened this issue Nov 22, 2013 · 3 comments
Closed

Problems with node-mongodb-native V1.3.20 #105

paulfryzel opened this issue Nov 22, 2013 · 3 comments

Comments

@paulfryzel
Copy link

Currently mongojs is configured to take the latest patch revision of node-mongodb-native (~1.3.19). However, the tests are now failing per the recent release of V1.3.20 (mongodb/node-mongodb-native@bead682). That actual commit doesn't seem to be part of the 1.4 branch (like its parent) any longer either (https://github.com/mongodb/node-mongodb-native/commits/1.4). Maybe it was force-pushed over? FYI, everything works fine when testing with V1.3.19.

As a quick fix, shrinkwrapping the node-mongodb-native package at 1.3.19 in any projects that use mongojs will work. Two things:

  1. I think mongojs should be locked at 1.3.19 until it's either updated to work with 1.3.20 or node-mongodb-native is made to be backwards compatible.
  2. Maybe going forward, it's worth locking to a specific version instead of the latest patch release with tilde.
~/github/vendor/mongojs(master)$ npm test

> [email protected] test /Users/paulfryzel/github/vendor/mongojs
> node ./tests

[err] 1/21 - test-chained-collection-names.js

      Error: Command failed:
      /Users/paulfryzel/github/vendor/mongojs/node_modules/mongodb/lib/mongodb/mongo_client.js:371
                throw err
                      ^
      TypeError: Cannot read property '0' of undefined
          at /Users/paulfryzel/github/vendor/mongojs/tests/test-chained-collection-names.js:8:21
          at /Users/paulfryzel/github/vendor/mongojs/index.js:133:20
          at apply (/Users/paulfryzel/github/vendor/mongojs/node_modules/thunky/index.js:16:28)
          at /Users/paulfryzel/github/vendor/mongojs/node_modules/thunky/index.js:20:25
          at /Users/paulfryzel/github/vendor/mongojs/index.js:124:20
          at apply (/Users/paulfryzel/github/vendor/mongojs/node_modules/thunky/index.js:16:28)
          at /Users/paulfryzel/github/vendor/mongojs/node_modules/thunky/index.js:20:25
          at /Users/paulfryzel/github/vendor/mongojs/index.js:295:20
          at apply (/Users/paulfryzel/github/vendor/mongojs/node_modules/thunky/index.js:16:28)
          at /Users/paulfryzel/github/vendor/mongojs/node_modules/thunky/index.js:20:25

          at ChildProcess.exithandler (child_process.js:632:15)
          at ChildProcess.EventEmitter.emit (events.js:98:17)
          at maybeClose (child_process.js:730:16)
          at Socket.<anonymous> (child_process.js:943:11)
          at Socket.EventEmitter.emit (events.js:95:17)
          at Pipe.close (net.js:451:12)

npm ERR! Test failed.  See above for more details.
npm ERR! not ok code 0
@nicolashery
Copy link

+1

Getting this with [email protected] and [email protected]:

/Users/nicolashery/Projects/test-app/node_modules/mongojs/node_modules/mongodb/lib/mongodb/mongo_client.js:406
              throw err
                    ^
TypeError: Cannot call method 'greaterThan' of undefined
    at Object.Cursor.nextObject (/Users/nicolashery/Projects/test-app/node_modules/mongojs/node_modules/mongodb/lib/mongodb/cursor.js:734:27)
    at /Users/nicolashery/Projects/test-app/node_modules/mongojs/index.js:87:6
    at apply (/Users/nicolashery/Projects/test-app/node_modules/mongojs/node_modules/thunky/index.js:16:28)
    at /Users/nicolashery/Projects/test-app/node_modules/mongojs/node_modules/thunky/index.js:20:25
    at Collection.find (/Users/nicolashery/Projects/test-app/node_modules/mongojs/node_modules/mongodb/lib/mongodb/collection/query.js:134:23)
    at /Users/nicolashery/Projects/test-app/node_modules/mongojs/index.js:125:20
    at apply (/Users/nicolashery/Projects/test-app/node_modules/mongojs/node_modules/thunky/index.js:16:28)
    at /Users/nicolashery/Projects/test-app/node_modules/mongojs/node_modules/thunky/index.js:20:25
    at Db.collection (/Users/nicolashery/Projects/test-app/node_modules/mongojs/node_modules/mongodb/lib/mongodb/db.js:494:44)
    at /Users/nicolashery/Projects/test-app/node_modules/mongojs/index.js:296:7

@mafintosh
Copy link
Collaborator

Thanks for bringing this to my attention. I've just published 0.9.8 which shrinkwraps mongodb to 1.3.19 to work around this issue.

@papajuans
Copy link
Contributor

Thanks, @mafintosh !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants