Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FYI : For anyone who have a problem with bcrypt installation module #22

Open
ariebrainware opened this issue Aug 15, 2018 · 0 comments
Open
Labels
bug Something isn't working enhancement New feature or request

Comments

@ariebrainware
Copy link

ariebrainware commented Aug 15, 2018

First of all you need to install python dependencies

sudo apt-get install -y build-essential python

If you use yarn , here's the syntax :

  1. yarn
  2. yarn add node-gyp bcrypt

If you use npm, here's the syntax:

  1. npm install
  2. npm install node-gyp bcryptjs

based on my experience, i'm using npm install bcrypt for installation, and got and error like this

rob0ne@l1nux:~/Desktop/GlintsClass#1/ariebrainware/connecc-api$ npm install -g bcrypt

> [email protected] install /home/rob0ne/.nvm/versions/node/v10.8.0/lib/node_modules/bcrypt
> node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Tried to download(404): https://github.com/kelektiv/node.bcrypt.js/releases/download/v3.0.0/bcrypt_lib-v3.0.0-node-v64-linux-x64-glibc.tar.gz 
node-pre-gyp WARN Pre-built binaries not found for [email protected] and [email protected] (node-v64 ABI, glibc) (falling back to source compile with node-gyp) 
make: Entering directory '/home/rob0ne/.nvm/versions/node/v10.8.0/lib/node_modules/bcrypt/build'
  CXX(target) Release/obj.target/bcrypt_lib/src/blowfish.o
  CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt.o
../src/bcrypt.cc: In function ‘void encode_salt(char*, u_int8_t*, char, u_int16_t, u_int8_t)’:
../src/bcrypt.cc:114:1: warning: ‘__builtin___snprintf_chk’ output may be truncated before the last format character [-Wformat-truncation=]
 encode_salt(char *salt, u_int8_t *csalt, char minor, u_int16_t clen, u_int8_t logr)
 ^~~~~~~~~~~
In file included from /usr/include/stdio.h:862:0,
                 from ../src/bcrypt.cc:34:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:65:44: note: ‘__builtin___snprintf_chk’ output between 4 and 5 bytes into a destination of size 4
        __bos (__s), __fmt, __va_arg_pack ());
                                            ^
../src/bcrypt.cc: In function ‘void bcrypt(const char*, const char*, char*)’:
../src/bcrypt.cc:147:1: warning: ‘__builtin___snprintf_chk’ output may be truncated before the last format character [-Wformat-truncation=]
 bcrypt(const char *key, const char *salt, char *encrypted)
 ^~~~~~
In file included from /usr/include/stdio.h:862:0,
                 from ../src/bcrypt.cc:34:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:65:44: note: ‘__builtin___snprintf_chk’ output between 4 and 5 bytes into a destination of size 4
        __bos (__s), __fmt, __va_arg_pack ());
                                            ^
  CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt_node.o
../src/bcrypt_node.cc: In function ‘char {anonymous}::ToCharVersion(v8::Local<v8::String>)’:
../src/bcrypt_node.cc:66:30: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local<v8::Value>)’ is deprecated: Use Isolate version [-Wdeprecated-declarations]
   String::Utf8Value value(str);
                              ^
In file included from /home/rob0ne/.node-gyp/10.8.0/include/node/v8.h:26:0,
                 from /home/rob0ne/.node-gyp/10.8.0/include/node/node.h:63,
                 from ../node_modules/nan/nan.h:51,
                 from ../src/bcrypt_node.cc:1:
/home/rob0ne/.node-gyp/10.8.0/include/node/v8.h:2852:28: note: declared here
                   explicit Utf8Value(Local<v8::Value> obj));
                            ^
/home/rob0ne/.node-gyp/10.8.0/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
  SOLINK_MODULE(target) Release/obj.target/bcrypt_lib.node
  COPY Release/bcrypt_lib.node
  COPY /home/rob0ne/.nvm/versions/node/v10.8.0/lib/node_modules/bcrypt/lib/binding/bcrypt_lib.node
  TOUCH Release/obj.target/action_after_build.stamp
make: Leaving directory '/home/rob0ne/.nvm/versions/node/v10.8.0/lib/node_modules/bcrypt/build'
+ [email protected]
added 71 packages from 49 contributors in 19.02s

in package.json dependencies, bcrypt not listed. But still can import that module. Thats the weird thing.

So i try to install bcryptjs . And running smoothly

Ref:
https://github.com/kelektiv/node.bcrypt.js/wiki/Installation-Instructions
https://www.npmjs.com/package/bcrypt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

8 participants