1

我有一个使用 node.js 运行的应用程序——为了解决一个特定的错误,我有一个自定义版本的节点(不是系统默认安装),我想用它来运行我的应用程序。所以在我的开始脚本中我改变了:

#!/usr/bin/env node

#!/Users/cmlacy/Dropbox/Engine/code/node-v0.8.9/out/Release/node

当我运行应用程序时,我得到了一系列在更改之前没有得到的错误:

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

我假设这是因为 node_modules 中的某些依赖项已针对错误的节点库进行编译 - 我该如何更改在编译期间包含在编译中的节点版本npm install

4

1 回答 1

0

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).

于 2013-10-30T11:14:13.653 回答