npm WARN EPEERINVALID mongodb-core@1.2.21 requires a peer of kerberos@~0.0 but none was installed.

162 views
Skip to first unread message

Thala Mew

unread,
Nov 19, 2015, 2:17:22 AM11/19/15
to node-mongodb-native
Took me a bit to find the backtrack to here but appears that mongodb@2.0.48 is causing this in connect-mongo@0.8.2.

Created an issue here on that project but probably needs to be done here as well... mirroring as:

I understand this is a warning but it just appeared after clearing ./node_modules and rerunning npm install both on our development and production.

This happened before any dep updates. About 20ish days ago we installed libkrb5-dev to prevent the error in the log mentioned here and everything was peachy until this evening. I don't believe that our VPS updated anything since the last dependency update was 8 days ago.

Any ideas?

Ref:
* OpenUserJs/OpenUserJS.org#832

I do notice that mongodb got an update in the last 12ish days and perhaps that is what happened.

Again... any ideas?

Christian Kvalheim

unread,
Nov 19, 2015, 4:53:56 AM11/19/15
to node-mongodb-native
The kerberos module has been changed to be a peerDependency

When using Node 5.0 or NPM 3.0 the module is not pulled down from NPM and built. Instead it expects the user to depend on the module itself if it needs kerberos.

I you need or want kerberos support just add the dependency

"kerberos": "0.0.x" to your package.json file and it will put it down and build it.

This was done to address the user confusion when installing the driver and failing to compile the module. 99.99% of users don't need kerberos so there should be no need to either depend on the MIT libraries or pull down the module.

Thala Mew

unread,
Nov 19, 2015, 2:19:12 PM11/19/15
to node-mongodb-native
That's what I figured out with this...

... although it seems to me that connect-mongo@0.8.2 (e.g. somewhere else in the chain) may want to make it an optionalDependencies to prevent its "own dependency hell".

We've moved it to optionalDependencies to indicate that we don't have direct support for it (as much as possible) but it seems like dependency hell is inevitable at the top-level usage and at the very least nagging warnings and errors.

As far as node@5.x goes... since there is no projected LTS support (as depicted in the image by node directly):

... most likely our project will never use it although we have been using npm@3.x for quite some time even in node@0.12.x just about six weeks back.

Thanks for your reply and confirmation.
Reply all
Reply to author
Forward
0 new messages