node-ldapauth icon indicating copy to clipboard operation
node-ldapauth copied to clipboard

npm install fail

Open joshuawarnock opened this issue 10 years ago • 2 comments

[email protected] install /Users/jwarnock/webstormprojects/testing/testing/ldap-auth/node_modules/bcrypt node-gyp rebuild

xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

CXX(target) Release/obj.target/bcrypt_lib/src/blowfish.o ./Release/.deps/Release/obj.target/bcrypt_lib/src/blowfish.o.d.raw { dev: 16777220, mode: 33188, nlink: 1, uid: 501, gid: 20, rdev: 0, blksize: 4096, ino: 5538113, size: 87, blocks: 8, atime: Tue Feb 02 2016 10:25:17 GMT-0800 (PST), mtime: Tue Feb 02 2016 10:25:17 GMT-0800 (PST), ctime: Tue Feb 02 2016 10:25:17 GMT-0800 (PST), birthtime: Tue Feb 02 2016 10:25:17 GMT-0800 (PST) } CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt.o ./Release/.deps/Release/obj.target/bcrypt_lib/src/bcrypt.o.d.raw { dev: 16777220, mode: 33188, nlink: 1, uid: 501, gid: 20, rdev: 0, blksize: 4096, ino: 5538118, size: 83, blocks: 8, atime: Tue Feb 02 2016 10:25:18 GMT-0800 (PST), mtime: Tue Feb 02 2016 10:25:18 GMT-0800 (PST), ctime: Tue Feb 02 2016 10:25:18 GMT-0800 (PST), birthtime: Tue Feb 02 2016 10:25:17 GMT-0800 (PST) } CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt_node.o ../src/bcrypt_node.cc:118:18: error: no member named 'Dispose' in 'v8::Persistent<v8::Function, v8::NonCopyablePersistentTraitsv8::Function >' callback.Dispose(); ~~~~~~~~ ^ ../src/bcrypt_node.cc:198:19: error: unknown type name 'uv_work_t' void GenSaltAsync(uv_work_t* req) { ^ ../src/bcrypt_node.cc:215:24: error: unknown type name 'uv_work_t' void GenSaltAsyncAfter(uv_work_t* req) { ^ ../src/bcrypt_node.cc:216:17: error: calling a protected constructor of class 'v8::HandleScope' HandleScope scope; ^ /Users/jwarnock/.node-gyp/5.0.0/include/node/v8.h:889:13: note: declared protected here V8_INLINE HandleScope() {} ^ ../src/bcrypt_node.cc:224:44: error: no member named 'New' in 'v8::String' argv[0] = Exception::Error(String::New(baton->error.c_str())); ~~~~~~~~^ ../src/bcrypt_node.cc:225:19: error: no matching function for call to 'Undefined' argv[1] = Undefined(); ^~~~~~~~~ /Users/jwarnock/.node-gyp/5.0.0/include/node/v8.h:315:27: note: candidate function not viable: requires single argument 'isolate', but no arguments were provided friend Local<Primitive> Undefined(Isolate* isolate); ^ ../src/bcrypt_node.cc:228:19: error: no matching function for call to 'Undefined' argv[0] = Undefined(); ^~~~~~~~~ /Users/jwarnock/.node-gyp/5.0.0/include/node/v8.h:315:27: note: candidate function not viable: requires single argument 'isolate', but no arguments were provided friend Local<Primitive> Undefined(Isolate* isolate); ^ ../src/bcrypt_node.cc:229:19: warning: 'Encode' is deprecated: Use Encode(isolate, ...) [-Wdeprecated-declarations] argv[1] = Encode(baton->salt.c_str(), baton->salt.size(), BINARY); ^ /Users/jwarnock/.node-gyp/5.0.0/include/node/node.h:299:45: note: 'Encode' has been explicitly marked deprecated here inline v8::Localv8::Value Encode( ^ /Users/jwarnock/.node-gyp/5.0.0/include/node/node.h:66:42: note: expanded from macro 'NODE_DEPRECATED' attribute((deprecated(message))) declarator ^ ../src/bcrypt_node.cc:234:20: error: member reference type 'v8::Persistentv8::Function' is not a pointer; maybe you meant to use '.'? baton->callback->Call(Context::GetCurrent()->Global(), 2, argv); ~~~~~~~~~~~~~~~^~ . ../src/bcrypt_node.cc:234:22: error: no member named 'Call' in 'v8::Persistent<v8::Function, v8::NonCopyablePersistentTraitsv8::Function >' baton->callback->Call(Context::GetCurrent()->Global(), 2, argv); ~~~~~~~~~~~~~~~ ^ ../src/bcrypt_node.cc:234:36: error: no member named 'GetCurrent' in 'v8::Context' baton->callback->Call(Context::GetCurrent()->Global(), 2, argv); ~~~~~~~~~^ ../src/bcrypt_node.cc:237:9: warning: 'FatalException' is deprecated: Use FatalException(isolate, ...) [-Wdeprecated-declarations] FatalException(try_catch); ^ /Users/jwarnock/.node-gyp/5.0.0/include/node/node.h:283:29: note: 'FatalException' has been explicitly marked deprecated here inline void FatalException(const v8::TryCatch& try_catch) { ^ /Users/jwarnock/.node-gyp/5.0.0/include/node/node.h:66:42: note: expanded from macro 'NODE_DEPRECATED' attribute((deprecated(message))) declarator ^ ../src/bcrypt_node.cc:242:34: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'? Handle<Value> GenerateSalt(const Arguments &args) { ^~~~~~~~~ v8::internal::Arguments /Users/jwarnock/.node-gyp/5.0.0/include/node/v8.h:139:7: note: 'v8::internal::Arguments' declared here class Arguments; ^ ../src/bcrypt_node.cc:243:17: error: calling a protected constructor of class 'v8::HandleScope' HandleScope scope; ^ /Users/jwarnock/.node-gyp/5.0.0/include/node/v8.h:889:13: note: declared protected here V8_INLINE HandleScope() {} ^ ../src/bcrypt_node.cc:245:32: error: type 'const v8::internal::Arguments' does not provide a subscript operator const ssize_t rounds = args[0]->Int32Value(); ~~~~^~ ../src/bcrypt_node.cc:246:30: error: type 'const v8::internal::Arguments' does not provide a subscript operator const int rand_len = args[1]->Int32Value(); ~~~~^~ ../src/bcrypt_node.cc:247:58: error: type 'const v8::internal::Arguments' does not provide a subscript operator Local<Function> callback = Local<Function>::Cast(args[2]); ~~~~^~ ../src/bcrypt_node.cc:251:45: error: 'New' is a private member of 'v8::PersistentBasev8::Function' baton->callback = Persistent<Function>::New(callback); ^ /Users/jwarnock/.node-gyp/5.0.0/include/node/v8.h:643:23: note: declared private here V8_INLINE static T* New(Isolate* isolate, T* that); ^ ../src/bcrypt_node.cc:251:57: error: too few arguments to function call, expected 2, have 1 baton->callback = Persistent<Function>::New(callback); ~~~~~~~~~~~~~~~~~~~~~~~~~ ^ /Users/jwarnock/.node-gyp/5.0.0/include/node/v8.h:643:3: note: 'New' declared here V8_INLINE static T* New(Isolate* isolate, T* that); ^ /Users/jwarnock/.node-gyp/5.0.0/include/node/v8config.h:301:20: note: expanded from macro 'V8_INLINE'

define V8_INLINE inline attribute((always_inline))

               ^

../src/bcrypt_node.cc:255:5: error: unknown type name 'uv_work_t' uv_work_t* req = new uv_work_t; ^ ../src/bcrypt_node.cc:255:26: error: unknown type name 'uv_work_t' uv_work_t* req = new uv_work_t; ^ fatal error: too many errors emitted, stopping now [-ferror-limit=] 2 warnings and 20 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:270:23) gyp ERR! stack at emitTwo (events.js:87:13) gyp ERR! stack at ChildProcess.emit (events.js:172:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12) gyp ERR! System Darwin 15.3.0 gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /Users/jwarnock/webstormprojects/testing/testing/ldap-auth/node_modules/bcrypt gyp ERR! node -v v5.0.0 gyp ERR! node-gyp -v v3.0.3 gyp ERR! not ok [email protected] /Users/jwarnock/webstormprojects/testing/testing/ldap-auth `-- (empty)

npm WARN EPACKAGEJSON [email protected] No description npm WARN EPACKAGEJSON [email protected] No repository field. npm ERR! Darwin 15.3.0 npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "ldapauth" "--save" npm ERR! node v5.0.0 npm ERR! npm v3.4.0 npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, 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.

npm ERR! Please include the following file with any support request: npm ERR! /Users/jwarnock/webstormprojects/testing/testing/ldap-auth/npm-debug.log npm ERR! code 1

joshuawarnock avatar Feb 02 '16 18:02 joshuawarnock

We have a fork that works around this: https://github.com/DimensionSoftware/node-ldapauth

Install with: npm i --no-optional https://github.com/DimensionSoftware/node-ldapauth

The --no-optional is important to avoid the dtrace stuff that will probably fail to compile unless you're on SmartOS or some Solaris derivative.

beppu avatar Feb 09 '16 22:02 beppu

That was helpful (y)

shenoyrahul444 avatar Sep 26 '17 00:09 shenoyrahul444