install error with msgpack
levelos opened this issue · 9 comments
clang: error: no such file or directory: 'Release/msgpack.node'
I'm using:
- Mountain Lion
- Node v0.8.12
similar...
npm ERR! System Linux 3.2.0-31-generic
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "underscore-cli"
npm ERR! cwd /home/ryan/npm
npm ERR! node -v v0.6.15
npm ERR! npm -v 1.1.9
npm ERR! code ELIFECYCLE
npm ERR! message msgpack@0.1.3 preinstall: `make`
npm ERR! message `sh "-c" "make"` failed with 2
npm ERR! errno {}
Exact issue on Ubuntu 12.04 when building msgpack:
[1/2] cxx: msgpack.cc -> ../build/Release/msgpack_1.o
../src/msgpack.cc: In function ‘v8::Handlev8::Value pack(const v8::Arguments&)’:
../src/msgpack.cc:292:16: error: ‘class node::Buffer’ has no member named ‘data’
../src/msgpack.cc: In function ‘v8::Handlev8::Value unpack(const v8::Arguments&)’:
../src/msgpack.cc:320:33: error: ‘class node::Buffer’ has no member named ‘data’
../src/msgpack.cc:320:46: error: ‘class node::Buffer’ has no member named ‘length’
../src/msgpack.cc:326:35: error: ‘class node::Buffer’ has no member named ‘length’
../src/msgpack.cc:340:1: warning: control reaches end of non-void function [-Wreturn-type]
Waf: Leaving directory `/usr/local/lib/node_modules/underscore-cli/node_modules/msgpack/build'
Build failed: -> task failed (err #1):
{task: cxx msgpack.cc -> msgpack_1.o}
Could be related to this: pgriess/node-msgpack#23
Not sure if the node-msgpack dependency just needs to be upgraded or the version in npm registry hasn't been updated.
Hmm. as a workaround, you could disable MessagePack, since it's optional unless you want to use that feature.
I'll try and test with the latest version.
p.s, underscoreCLI lazy loads the 'msgpack' module, so if it's not installed, nothing will break unless you use that format directly.
Is there a way with npm to tell it to ignore the msgpack dependency?
I wish that was "easier". By far the most straightforward way is to delete it from package.json
I guess in theory, I could push a 2nd version of the module to the NPM repo ... "underscore-cli-nomsgpack" that would have exactly that package.json change. Is that worth it?
Here's some other folks asking for "optional dependencies" in npm:
https://github.com/isaacs/npm/issues/995
!!!!! NPM supports a "optionalDependencies" field !!!!!!!!!
PROBLEM SOLVED. :)
pushing v0.2.16 that addresses this issue :)