14

I wanted play around with mongo-client by Raynos. However, when I add "mongo-client" : "0.2.1" to my package.json dependencies, I get the following:

(node-gyp rebuild 2> builderror.log) || (exit 0)

CXX(target) Release/obj.target/bson/ext/bson.o
SOLINK_MODULE(target) Release/bson.node
SOLINK_MODULE(target) Release/bson.node: Finished

The builderror log is empty. And if I run npm install again, I get a lot of unmet dependencies, such as:

npm WARN unmet dependency /node_modules/mongo-client requires reducible@'Raynos/reducible#v1.0.6' but will load
npm WARN unmet dependency /node_modules/reducible,

Now, I haven't encountered an error like this before. There are no reported issues on GIT with mongo-client. So, I want to know at a high-level what is going on and how to interpret the error?

Of course, I googled too. I'm thinking this might fix it:

https://github.com/TooTallNate/node-gyp/wiki/Updating-npm's-bundled-node-gyp

but when I run:

$  sudo npm explore npm -g -- npm install node-gyp

I get TypeError: Bad argument

Any insight and guidance on next steps appreciated.

Thank you.

4

3 回答 3

6

I get the same messages when installing mongo-client as well, but they are warnings and not errors, so npm continues.

The warnings are related to some custom dependencies (see here) for mongo-client, which cannot be resolved by npm. However, it tries to do the right thing by installing non-custom versions of those dependencies instead (and tells you about it with a warning).

It might, or might not, work after installing. I got as far as running require('mongo-client') which didn't raise any errors, but it might still run into problems when actually in use.

Perhaps the author of mongo-client has a reason to include these custom dependencies, but they really should be either included as part of his own module, or he should have used a proper location (like a Github repository) from which npm can install them.

于 2013-05-10T17:00:49.757 回答
0

I had the same problem whilst installing gulp and its dependencies. I resolved by updating the npm package. Try: npm install -g npm

于 2015-01-31T13:47:00.773 回答
0

Is a mongod instance running?

I received a (node-gyp rebuild 2> builderror.log) || (exit 0) message trying to install the mondgodb driver while an instance of mongod was running. After stopping mongod, I no longer received the message.

于 2015-08-22T15:47:19.333 回答