Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to updated node-gyp and/or interpret "node-gyp rebuild 2> builderror.log)"?

Tags:

node.js

unix

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.

like image 998
cathy.sasaki Avatar asked May 10 '13 00:05

cathy.sasaki


People also ask

Which file does node-gyp use to read the build configuration of a?

The binding.gyp file describes the configuration to build your module, in a JSON-like format. This file gets placed in the root of your package, alongside package.

What does node pre gyp do?

Some node modules use node-pre-gyp to download pre-compiled binaries. By default, node-pre-gyp will try to download those binaries from an external resource, like github. This tutorial will leverage the functionality of node-pre-gyp to download binaries from a mirror.


1 Answers

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.

like image 182
robertklep Avatar answered Oct 07 '22 20:10

robertklep