This bug is so weird that it's even a bit difficult to describe, so I'll illustrate with an example. Basically what happens is that a certain combination of modules prevents native modules from being built. The modules in question are zmq and sinon-chai.
(Note that you'll have to brew install zeromq before running the examples)
Example. This works like it should, and produces zmq.node:
➜ test npm install zmq
> zmq@2.7.0 install /private/tmp/test/node_modules/zmq
> node-gyp rebuild
CXX(target) Release/obj.target/zmq/binding.o
SOLINK_MODULE(target) Release/zmq.node
ld: warning: directory not found for option '-L/opt/local/lib'
SOLINK_MODULE(target) Release/zmq.node: Finished
zmq@2.7.0 node_modules/zmq
├── bindings@1.1.1
└── nan@0.8.0
However, if I also install sinon-chai at the same time, zmq.node will not get built: (rm -rf node_modules before running):
➜ test npm install zmq sinon-chai
zmq@2.7.0 node_modules/zmq
├── bindings@1.1.1
└── nan@0.8.0
chai@1.9.1 node_modules/chai
├── assertion-error@1.0.0
└── deep-eql@0.1.3 (type-detect@0.1.1)
sinon@1.10.2 node_modules/sinon
├── util@0.10.3 (inherits@2.0.1)
└── formatio@1.0.2 (samsam@1.1.1)
sinon-chai@2.5.0 node_modules/sinon-chai
Any other combination works. For example, installing sinon and chai (the dependencies of sinon-chai) with zmq works like it should:
➜ test npm install zmq sinon chai
> zmq@2.7.0 install /private/tmp/test/node_modules/zmq
> node-gyp rebuild
CXX(target) Release/obj.target/zmq/binding.o
SOLINK_MODULE(target) Release/zmq.node
ld: warning: directory not found for option '-L/opt/local/lib'
SOLINK_MODULE(target) Release/zmq.node: Finished
chai@1.9.1 node_modules/chai
├── assertion-error@1.0.0
└── deep-eql@0.1.3 (type-detect@0.1.1)
sinon@1.10.2 node_modules/sinon
├── util@0.10.3 (inherits@2.0.1)
└── formatio@1.0.2 (samsam@1.1.1)
zmq@2.7.0 node_modules/zmq
├── bindings@1.1.1
└── nan@0.8.0
This is the only failing combination I have managed to find (and in an actual app using package.json, too).
The problem occurs on every machine we have tried so far, including my developer machine (version information below) and a production build server running node v0.10.28 with the default NPM.
➜ test npm version
{ http_parser: '1.0',
node: '0.10.26',
v8: '3.14.5.9',
ares: '1.9.0-DEV',
uv: '0.10.25',
zlib: '1.2.3',
modules: '11',
openssl: '1.0.1e',
npm: '1.4.13' }
Any ideas?
This bug is so weird that it's even a bit difficult to describe, so I'll illustrate with an example. Basically what happens is that a certain combination of modules prevents native modules from being built. The modules in question are
zmqandsinon-chai.(Note that you'll have to
brew install zeromqbefore running the examples)Example. This works like it should, and produces zmq.node:
However, if I also install
sinon-chaiat the same time, zmq.node will not get built: (rm -rf node_modulesbefore running):➜ test npm install zmq sinon-chai zmq@2.7.0 node_modules/zmq ├── bindings@1.1.1 └── nan@0.8.0 chai@1.9.1 node_modules/chai ├── assertion-error@1.0.0 └── deep-eql@0.1.3 (type-detect@0.1.1) sinon@1.10.2 node_modules/sinon ├── util@0.10.3 (inherits@2.0.1) └── formatio@1.0.2 (samsam@1.1.1) sinon-chai@2.5.0 node_modules/sinon-chaiAny other combination works. For example, installing
sinonandchai(the dependencies ofsinon-chai) withzmqworks like it should:This is the only failing combination I have managed to find (and in an actual app using package.json, too).
The problem occurs on every machine we have tried so far, including my developer machine (version information below) and a production build server running node v0.10.28 with the default NPM.
Any ideas?