kelektiv / node.bcrypt.js

bcrypt for NodeJs
MIT License
7.49k stars 517 forks source link

npm install bcrypt error in OSX ElCapitan #373

Closed activexJ closed 9 years ago

activexJ commented 9 years ago

Hi When i tried to install bcrypt using npm it shows error. I have attached the error log. Please help me to install.

Error 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 ../src/bcrypt_node.cc:118:18: error: no member named 'Dispose' in 'v8::Persistent<v8::Function, v8::NonCopyablePersistentTraits >' callback.Dispose();


../src/bcrypt_node.cc:202:19: error: unknown type name 'uv_work_t'
void GenSaltAsync(uv_work_t\* req) {
                  ^
../src/bcrypt_node.cc:219:24: error: unknown type name 'uv_work_t'
void GenSaltAsyncAfter(uv_work_t\* req) {
                       ^
../src/bcrypt_node.cc:220:17: error: calling a protected constructor of class
      'v8::HandleScope'
    HandleScope scope;
                ^

Thanks
activexJ commented 9 years ago

Versions/3.4/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin 189 verbose lifecycle bcrypt@0.7.7~install: CWD: /Development/Node/jwt-node-express/node_modules/bcrypt 190 silly lifecycle bcrypt@0.7.7~install: Args: [ '-c', 'node-gyp rebuild' ] 191 silly lifecycle bcrypt@0.7.7~install: Returned: code: 1 signal: null 192 info lifecycle bcrypt@0.7.7~install: Failed to exec install script 193 verbose unlock done using /Users/jeba/.npm/_locks/staging-b498f4c96d041440.lock for /Development/Node/jwt-node-express/node_modules/.staging 194 silly rollbackFailedOptional Starting 195 silly rollbackFailedOptional Finishing 196 silly runTopLevelLifecycles Starting 197 silly runTopLevelLifecycles Finishing 198 silly install printInstalled 199 verbose stack Error: bcrypt@0.7.7 install: node-gyp rebuild 199 verbose stack Exit status 1 199 verbose stack at EventEmitter. (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:233:16) 199 verbose stack at emitTwo (events.js:87:13) 199 verbose stack at EventEmitter.emit (events.js:172:7) 199 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:24:14) 199 verbose stack at emitTwo (events.js:87:13) 199 verbose stack at ChildProcess.emit (events.js:172:7) 199 verbose stack at maybeClose (internal/child_process.js:818:16) 199 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5) 200 verbose pkgid bcrypt@0.7.7 201 verbose cwd /Development/Node/jwt-node-express 202 error Darwin 15.0.0 203 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "bcrypt" 204 error node v4.2.1 205 error npm v3.3.9 206 error code ELIFECYCLE 207 error bcrypt@0.7.7 install: node-gyp rebuild 207 error Exit status 1 208 error Failed at the bcrypt@0.7.7 install script 'node-gyp rebuild'. 208 error This is most likely a problem with the bcrypt package, 208 error not with npm itself. 208 error Tell the author that this fails on your system: 208 error node-gyp rebuild 208 error You can get their info via: 208 error npm owner ls bcrypt 208 error There is likely additional logging output above. 209 verbose exit [ 1, true ]

defunctzombie commented 9 years ago

Your environment is not setup correctly for building native modules. Please do some more googled and reading of readme files.

kamakazikamikaze commented 8 years ago

I hope I'm not re-opening this by commenting. @activexJ In case you haven't resolved this yet, I fixed this by removing the Python installed in my Library Frameworks folder. Somewhere in the transition between Mavericks, Yosemite and El Capitan it was left there and the system set that as its default directory. Had to remove it, install Python via Brew, then fix some symlinks with it. My issue with installing it may not be the same for you, but I would start there.

@defunctzombie would it help if sometime down the road we compile the better-known solutions into a help file so that tickets like these are slowed down? I see another ticket or two recently created that can easily be solved with something like that -- though the persons should be searching via Google anyways for a solution