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

Node version v5.5.0 Cannot read property 'Kerberos' of undefined error #3866

Closed
NetanelBasal opened this issue Feb 7, 2016 · 11 comments
Closed

Comments

@NetanelBasal
Copy link

I am using node version 5.5.0 and when i am require mongoose i get this error:
Cannot read property 'Kerberos' of undefined

@chelinho139
Copy link

this is happening to me too, in every computer! please is urgent!

@chelinho139
Copy link

Running on MacOS node version: v4.2.3
Running on Amazon Linux node version: v6.0.0-pre

@chelinho139
Copy link

temporal fix:
rm -rf /node_modules/mongoose/node_modules/mogodb npm install --prefix ./node_modules/mongoose/ mongodb@2.1.6 --save

@yvan
Copy link

yvan commented Feb 8, 2016

yeah this is happening to me as well.

@chelinho139: are you sure you don't mean?

(missing 'n' in mongodb)

rm -rf /node_modules/mongoose/node_modules/mongodb

and then

npm install --prefix ./node_modules/mongoose/ mongodb@2.1.6 --save

@chelinho139
Copy link

@yvan
yes sorry for that typeo..
rm -rf /node_modules/mongoose/node_modules/mongodb npm install --prefix ./node_modules/mongoose/ mongodb@2.1.6 --save

@NetanelBasal
Copy link
Author

Your soultion don't work exactly like this, what i did and it works is:

  1. Remove mongoose and mongodb.
  2. Install mongoose.
  3. Go to ./node-modules/mongoose and open package.json, change mongodb version to 2.1.6
  4. Run npm install in mongoose root.

@domjtalbot
Copy link

Alternatively I found installing the Kerberos module helped to fix this.
npm install kerberos --save

@yvan
Copy link

yvan commented Feb 9, 2016

None of this ended up helping I ran into other issues. I exhausted most online threads and my patience. I went from monk to mongoose, back to monk, and now i'm just using the native node.js mongo driver for my little scripts. Monk and mongoose were working so well just a few months ago ...

@kenjones-cisco
Copy link

The root cause is within https://www.npmjs.com/package/mongodb-core which prints out the error when the kerberos (optional) dependency is not installed. (mongodb-js/mongodb-core@c130871)

mongodb-core has removed the printing out the error message in version 1.3.1
mongodb upgrades its dependency on mongodb-core in version 2.1.6
mongoose in the latest releases version 4.4.2 is using mongodb version 2.1.5

The error message is just annoying and should not have any impact on using mongoose. If you require the Kerberos feature then you probably already had it installed or were possibly depending on npm to install peer dependencies for you. As @domjtalbot noted you can install kerberos or wait for the next release of mongoose that upgrades to mongodb 2.1.6+

@kenjones-cisco
Copy link

Already resolved in master (8fe1fa3)

pomeo added a commit to pomeo/video that referenced this issue Feb 9, 2016
@yvan
Copy link

yvan commented Feb 27, 2016

@kenjones-cisco thanks

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

6 participants