简体   繁体   中英

Node.js Mongodb - Kerberos module not found

Im trying to npm install mongodb. It works and tells me that modules are installed, kerberos is in this list.

But when im trying to run my app i keep getting this:

Error: Cannot find module '../build/Release/kerberos' from '/Users/snorre edwin/Code/raspberry-node-         server/node_modules/mongodb/node_modules/mongodb-core/node_modules/kerberos/lib'
Error: Cannot find module '../../../build/Release/kerberos' from '/Users/snorre edwin/Code/raspberry-node-server/node_modules/mongodb/node_modules/mongodb-core/node_modules/kerberos/lib/win32/wrappers'
Error: Cannot find module '../../../build/Release/kerberos' from '/Users/snorre edwin/Code/raspberry-node-server/node_modules/mongodb/node_modules/mongodb-core/node_modules/kerberos/lib/win32/wrappers'
Error: Cannot find module '../../../build/Release/kerberos' from '/Users/snorre edwin/Code/raspberry-node-server/node_modules/mongodb/node_modules/mongodb-core/node_modules/kerberos/lib/win32/wrappers'
Error: Cannot find module '../../../build/Release/kerberos' from '/Users/snorre edwin/Code/raspberry-node-server/node_modules/mongodb/node_modules/mongodb-core/node_modules/kerberos/lib/win32/wrappers'

It doesnt make sense, since this is a module which comes with the mongodb package.

Anyone else experienced this?

A quick Google found this discussion thread: https://nodejstools.codeplex.com/workitem/532 . Although it is in context of Microsoft VS.

Different, possible solutions include:

  1. Instal mongoose (not mongo) globally using npm install mongoose -g .

    So I fixed this issue by installing mongoose globally via NPM, then I copied the build folder in the mongoose/node_modules/mongodb/kerberos to my local mongoose folder in my VS project.

  2. If you're using mongoose, the thread additionally suggests you'll need python installed.

  3. Add kerberos to the package.json file itself. Also try to install globally.

  4. Ignore it:

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM