christkv/node-mongodb-native — Issue #517: Native BSON parser install error with npm
Author: metrip
Created: 2012-02-23 14:12:29+00:00
State: open

`npm install mongodb --mongodb:native` produces an error. Installation without the compiled BSON parser works.

The error is produced during the BSON tests. The tests attempt to use `../../test/gridstore/test_gs_weird_bug.png`, which does not exist, as the test directory has been ignored in `.npmignore`.

Log:

% npm install mongodb --mongodb:native

> mongodb@0.9.9-2 install /usr/local/lib/node_modules/mongodb
> node install.js

================================================================================
= =
= To install with C++ bson parser do =
= =
================================================================================
make -C ./external-libs/bson all
rm -rf build .lock-wscript bson.node
node-waf configure build
Checking for program g++ or c++ : /usr/bin/g++
Checking for program cpp : /usr/bin/cpp
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for g++ : ok
Checking for node path : not found
Checking for node prefix : ok /usr/local/Cellar/node/0.6.11
'configure' finished successfully (0.041s)
Waf: Entering directory `/usr/local/lib/node_modules/mongodb/external-libs/bson/build'
[1/2] cxx: bson.cc -> build/Release/bson_1.o
[2/2] cxx_link: build/Release/bson_1.o -> build/Release/bson.node
Waf: Leaving directory `/usr/local/lib/node_modules/mongodb/external-libs/bson/build'
'build' finished successfully (1.201s)
cp -R ./build/Release/bson.node . || true
=== EXECUTING TEST_BSON ===
=== EXECUTING TEST_FULL_BSON ===

node.js:201
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: ENOENT, no such file or directory '../../test/gridstore/test_gs_weird_bug.png'
at Object.openSync (fs.js:230:18)
at Object.readFileSync (fs.js:120:15)
at Object. (/usr/local/lib/node_modules/mongodb/external-libs/bson/test/test_full_bson.js:176:15)
at Module._compile (module.js:441:26)
at Object..js (module.js:459:10)
at Module.load (module.js:348:31)
at Function._load (module.js:308:12)
at Array.0 (module.js:479:10)
at EventEmitter._tickCallback (node.js:192:40)
make[1]: *** [all] Error 1
make: *** [build_native] Error 2
child process exited with code 2
mongodb@0.9.9-2 ./mongodb