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

TypeError: Object [object Object] has no method 'collectionNames' #19

Open
bitliner opened this issue Mar 25, 2015 · 1 comment
Open

Comments

@bitliner
Copy link

It throws the following error:

TypeError: Object [object Object] has no method 'collectionNames'
    at getCollectionNames (/home/---/wonderflow/wonderboard/backend/de-en-review-translator/node_modules/pow-mongodb-fixtures/src/index.js:156:28)
    at /home/---/wonderflow/wonderboard/backend/de-en-review-translator/node_modules/pow-mongodb-fixtures/node_modules/async/lib/async.js:494:21
    at /home/---/wonderflow/wonderboard/backend/de-en-review-translator/node_modules/pow-mongodb-fixtures/node_modules/async/lib/async.js:194:13
    at iterate (/home/---/wonderflow/wonderboard/backend/de-en-review-translator/node_modules/pow-mongodb-fixtures/node_modules/async/lib/async.js:118:13)
    at /home/---/wonderflow/wonderboard/backend/de-en-review-translator/node_modules/pow-mongodb-fixtures/node_modules/async/lib/async.js:129:25
    at /home/---/wonderflow/wonderboard/backend/de-en-review-translator/node_modules/pow-mongodb-fixtures/node_modules/async/lib/async.js:196:17
    at /home/---/wonderflow/wonderboard/backend/de-en-review-translator/node_modules/pow-mongodb-fixtures/node_modules/async/lib/async.js:499:34
    at /home/---/wonderflow/wonderboard/backend/de-en-review-translator/node_modules/pow-mongodb-fixtures/src/index.js:146:17
    at /home/---/wonderflow/wonderboard/backend/de-en-review-translator/node_modules/pow-mongodb-fixtures/src/index.js:287:35
    at /home/---/wonderflow/wonderboard/backend/de-en-review-translator/node_modules/pow-mongodb-fixtures/node_modules/mongodb/lib/db.js:200:5

The program is the following:

var fixtures2 = require('pow-mongodb-fixtures').connect('test', {
  host: 'localhost',
  port: 27017,
/*  user:'test',
  pass:'test'
*/
});

fixtures2.clearAllAndLoad(require('./test/data/data.js'), function(err){
        console.log(err);
})



by console I can login to mongodb and read the test database.

walkingice added a commit to walkingice/pow-mongodb-fixtures that referenced this issue Mar 31, 2015
use `collections` to replace `collectionsNames` to fix issue powmedia#19
@pwaller
Copy link

pwaller commented Apr 7, 2015

+1 hit this problem.

This would not have happened in the version of mongodb was pinned more carefully.

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

2 participants