npm install mongoose fails (kerberos and bson errors) npm install mongoose fails (kerberos and bson errors) mongoose mongoose

npm install mongoose fails (kerberos and bson errors)


For anyone on a Linux distro ensure you have libkrb5-dev (or your distro's similar package) installed. This will take care of many build errors with bson and kerberos.


For ubuntu users, first uninstall moongose

npm uninstall mongoose --save

then install the a kerberos update

apt-get install libkrb5-dev

then "install" moongose again

npm install mongoose --save

I hope this helps somebody there.


I've fixed this by installing node-gyp into the global scope. Hope it helps.

$ npm install -g node-gyp