xcode - 在 yosemite 上使用 npm 安装 bcrypt 时出错

标签 xcode node.js osx-yosemite bcrypt

我正在尝试在安装了 xcode 6.3 beta 和 Node 0.12 的 yosemite 上使用 npm 安装 bcrypt。首先,我遇到以下问题,并可以使用给定的答案解决它:xcode-select active developer directory error

但是现在我遇到了这个问题:

    > bcrypt@0.8.1 install /Users/reweber/Idea/rtschat/node_modules/bcrypt
    > node-gyp rebuild

    child_process: customFds option is deprecated, use stdio instead.
    CXX(target) Release/obj.target/bcrypt_lib/src/blowfish.o
    CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt.o
    CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt_node.o
    In file included from ../src/bcrypt_node.cc:1:
    In file included from ../node_modules/nan/nan.h:63:
    ../node_modules/nan/nan_new.h:207:43: error: inline declaration of 'NanNew' follows non-inline definition
    template <typename T> inline v8::Local<T> NanNew(v8::Handle<T> h);
    ^
    ../node_modules/nan/nan_implementation_12_inl.h:218:1: note: previous definition is here
    NanNew(v8::Handle<T> h) {
    ^
    In file included from ../src/bcrypt_node.cc:1:
    In file included from ../node_modules/nan/nan.h:63:
    ../node_modules/nan/nan_new.h:208:43: error: inline declaration of 'NanNew' follows non-inline definition
    template <typename T> inline v8::Local<T> NanNew(v8::Persistent<T> const& p);
    ^
    ../node_modules/nan/nan_implementation_12_inl.h:224:1: note: previous definition is here
    NanNew(v8::Persistent<T> const& p) {
    ^
    2 errors generated.
    make: *** [Release/obj.target/bcrypt_lib/src/bcrypt_node.o] Error 1
    gyp ERR! build error
    gyp ERR! stack Error: `make` failed with exit code: 2
    gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
    gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
    gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1067:12)
    gyp ERR! System Darwin 14.1.0
    gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
    gyp ERR! cwd /Users/reweber/Idea/rtschat/node_modules/bcrypt
    gyp ERR! node -v v0.12.0
    gyp ERR! node-gyp -v v1.0.2
    gyp ERR! not ok
    npm ERR! Darwin 14.1.0
    npm ERR! argv "node" "/usr/local/bin/npm" "install" "bcrypt"
    npm ERR! node v0.12.0
    npm ERR! npm  v2.5.1
    npm ERR! code ELIFECYCLE

    npm ERR! bcrypt@0.8.1 install: `node-gyp rebuild`
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the bcrypt@0.8.1 install script 'node-gyp rebuild'.
    npm ERR! This is most likely a problem with the bcrypt package,
    npm ERR! not with npm itself.
    npm ERR! Tell the author that this fails on your system:
    npm ERR!     node-gyp rebuild
    npm ERR! You can get their info via:
    npm ERR!     npm owner ls bcrypt
    npm ERR! There is likely additional logging output above.

最佳答案

我从最新的bcrypt版本0.8.1更改为0.8.0,解决了问题。

关于xcode - 在 yosemite 上使用 npm 安装 bcrypt 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28462044/

相关文章:

XCode 4 单元测试 : Is it possible to ignore certain test cases?

swift - 如何在 SwiftUI 中以编程方式切换到另一个 View (无需按下按钮)

node.js - sequelize 中的多个查询

ruby-on-rails - 在 OS X Yosemite 上修复 Ruby

swift - 带有参数 gestureRecognizer 的选择器

ios - iOS 单元/应用程序测试目标如何与其宿主应用程序中的类进行链接?

node.js - Heroku 推送失败,远程被拒绝

javascript - 行尾无法通过正则表达式删除或 trim Node.JS

ruby - Yosemite 上的 Brew 更新失败

c++ - RcppArmadillo 和 R 3.1.3 以及 Mac Yosemite 的编译错误