I have an application that runs using node.js - in order to run down a particular bug, I have a custom version of node (not the system default install) that I want to run my application with. So in my start script I change:
#!/usr/bin/env node
to
#!/Users/cmlacy/Dropbox/Engine/code/node-v0.8.9/out/Release/node
When I run the application, I get a series of errors that I don't get before the change:
crispin:node cmlacy$ ./engine.js
dyld: lazy symbol binding failed: Symbol not found: __ZN2v816FunctionTemplate3NewEPFNS_6HandleINS_5ValueEEERKNS_9ArgumentsEES3_NS1_INS_9SignatureEEE
Referenced from: /Users/cmlacy/Dropbox/Engine/code/Engine-Developer/node/node_modules/mongodb/node_modules/bson/build/Release/bson.node
Expected in: dynamic lookup
dyld: Symbol not found: __ZN2v816FunctionTemplate3NewEPFNS_6HandleINS_5ValueEEERKNS_9ArgumentsEES3_NS1_INS_9SignatureEEE
Referenced from: /Users/cmlacy/Dropbox/Engine/code/Engine-Developer/node/node_modules/mongodb/node_modules/bson/build/Release/bson.node
Expected in: dynamic lookup
Trace/BPT trap: 5
I'm assuming that this is because some of the dependencies in node_modules have been compiled against the wrong node libraries - how do I go about changing the version of node that is included in compilation during an npm install?
Make sure your specific node version is in the path before the system node in your shells. That should do it (and of course clean out any old node_modules build directories).