Npm bcrypt and meteor npm bcrypt madness

Further info on this. The bcrypt of accounts-base package seems to have a problem with Mongo version 3.4 and above. It constantly crashes our frontend app which is developed on Galaxy. See the log:


2017-06-14 00:54:23+01:00Note: you are using a pure-JavaScript implementation of bcrypt.
y7nb
2017-06-14 00:54:23+01:00While this implementation will work correctly, it is known to be
y7nb
2017-06-14 00:54:23+01:00approximately three times slower than the native implementation.
y7nb
2017-06-14 00:54:23+01:00In order to use the native implementation instead, run
y7nb
2017-06-14 00:54:23+01:00
y7nb
2017-06-14 00:54:23+01:00 meteor npm install --save bcrypt
y7nb
2017-06-14 00:54:23+01:00
y7nb
2017-06-14 00:54:23+01:00in the root directory of your application.
y7nb
2017-06-14 00:54:24+01:00
y7nb
2017-06-14 00:54:24+01:00/app/bundle/programs/server/node_modules/fibers/future.js:313
y7nb
2017-06-14 00:54:24+01:00	throw(ex);
y7nb
2017-06-14 00:54:24+01:00	^
y7nb
2017-06-14 00:54:24+01:00MongoError: no SNI name sent, make sure using a MongoDB 3.4+ driver/shell.
y7nb
2017-06-14 00:54:24+01:00 at Object.Future.wait (/app/bundle/programs/server/node_modules/fibers/future.js:449:15)
y7nb
2017-06-14 00:54:24+01:00 at new MongoConnection (packages/mongo/mongo_driver.js:219:27)
y7nb
2017-06-14 00:54:24+01:00 at new MongoInternals.RemoteCollectionDriver (packages/mongo/remote_collection_driver.js:4:16)
y7nb
2017-06-14 00:54:24+01:00 at Object.<anonymous> (packages/mongo/remote_collection_driver.js:38:10)
y7nb
2017-06-14 00:54:24+01:00 at Object.defaultRemoteCollectionDriver (packages/underscore.js:784:19)
y7nb
2017-06-14 00:54:24+01:00 at new Mongo.Collection (packages/mongo/collection.js:103:40)
y7nb
2017-06-14 00:54:24+01:00 at AccountsServer.AccountsCommon (packages/accounts-base/accounts_common.js:23:18)
y7nb
2017-06-14 00:54:24+01:00 at new AccountsServer (packages/accounts-base/accounts_server.js:18:5)
y7nb
2017-06-14 00:54:24+01:00 at meteorInstall.node_modules.meteor.accounts-base.server_main.js (packages/accounts-base/server_main.js:9:12)
y7nb
2017-06-14 00:54:24+01:00 at fileEvaluate (packages/modules-runtime.js:181:9)
y7nb
2017-06-14 00:54:24+01:00 - - - - -
y7nb
2017-06-14 00:54:24+01:00 at Function.MongoError.create (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/error.js:31:11)
y7nb
2017-06-14 00:54:24+01:00 at /app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/connection/pool.js:483:72
y7nb
2017-06-14 00:54:24+01:00 at authenticateStragglers (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/connection/pool.js:429:16)
y7nb
2017-06-14 00:54:24+01:00 at [object Object].messageHandler (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/connection/pool.js:463:5)
y7nb
2017-06-14 00:54:24+01:00 at TLSSocket.<anonymous> (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/connection/connection.js:309:22)
y7nb
2017-06-14 00:54:24+01:00 at emitOne (events.js:77:13)
y7nb
2017-06-14 00:54:24+01:00 at TLSSocket.emit (events.js:169:7)
y7nb
2017-06-14 00:54:24+01:00 at readableAddChunk (_stream_readable.js:153:18)
y7nb
2017-06-14 00:54:24+01:00 at TLSSocket.Readable.push (_stream_readable.js:111:10)
y7nb
2017-06-14 00:54:24+01:00 at TLSWrap.onread (net.js:537:20)
y7nb
2017-06-14 00:54:25+01:00Application exited with code: 1
y7nb
2017-06-14 00:54:29+01:00The container has crashed. A new container will be started to replace it.

In your first message, the 404 error should be harmless. It just means a pre-built binary was not available and that Meteor will have to compile it for you, which by the looks of the logs, it did!

As to your second post – there is no connection between the bcrypt error and the (older, based on your Meteor version) MongoDB Node driver not working with the (newer) MongoDB 3.4 server which Mongo Atlas hosts. But we can discuss that the other, more relevant post you have about this (Galaxy deployment breaks accounts-base package with MongoDb 3.4+). :slight_smile:

2 Likes

This worked for me. Thanks!

Make sure you always call npm from under meteor. You may be doing that, but in your writeup you did not include meteor in your install line - it should always have meteor in front meteor npm --install [somepackage] --save

1 Like

What if I need accounts-password?

You really just need to make sure you install it from the meteor node version. You can either sync your system node and npm versions to meteor and then run the command to instlal bcrypt, or you can just make sure you always (even for other modules!) use meteor npm to install and remove npm modules, and never npm directly.

You may need to remove bcrypt then put it back, though I’ve found simply reinstalling it correctly fixes up that message every time.

meteor npm uninstall --save bcrypt
meteor npm i -S bcrypt

This goes for yarn too:

meteor npm i -g yarn
meteor yarn add bcrypt
2 Likes

@fbosler follow this steps

meteor remove accounts-password
meteor npm uninstall --save bcrypt
meteor npm install --save bcrypt
meteor add accounts-password
4 Likes

Removing npm-bcrypt from my .meteor/versions file worked for me.

Note: I’m on a Mac.

This has returned after the 1.6 update. Following the steps results in an error:

W20171031-14:13:38.485(1)? (STDERR) Note: you are using a pure-JavaScript implementation of bcrypt.
W20171031-14:13:38.485(1)? (STDERR) While this implementation will work correctly, it is known to be
W20171031-14:13:38.486(1)? (STDERR) approximately three times slower than the native implementation.
W20171031-14:13:38.486(1)? (STDERR) In order to use the native implementation instead, run
W20171031-14:13:38.486(1)? (STDERR) 
W20171031-14:13:38.486(1)? (STDERR)   meteor npm install --save bcrypt
W20171031-14:13:38.486(1)? (STDERR) 
W20171031-14:13:38.486(1)? (STDERR) in the root directory of your application.
^C
Uniti-iMac-6:transmate Rijk$ meteor npm install --save bcrypt

> bcrypt@0.8.7 install /Volumes/iMac HDD/Rijk/Code/Projects/transmate/node_modules/bcrypt
> node-gyp rebuild

  CXX(target) Release/obj.target/bcrypt_lib/src/blowfish.o
clang: error: no such file or directory: 'HDD/Rijk/.meteor/packages/meteor-tool/.1.6.0.1tp1xc0++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/include/node'
clang: error: no such file or directory: 'HDD/Rijk/.meteor/packages/meteor-tool/.1.6.0.1tp1xc0++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/src'
clang: error: no such file or directory: 'HDD/Rijk/.meteor/packages/meteor-tool/.1.6.0.1tp1xc0++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/deps/uv/include'
clang: error: no such file or directory: 'HDD/Rijk/.meteor/packages/meteor-tool/.1.6.0.1tp1xc0++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/deps/v8/include'
make: *** [Release/obj.target/bcrypt_lib/src/blowfish.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Volumes/iMac HDD/Rijk/.meteor/packages/meteor-tool/.1.6.0.1tp1xc0++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack     at emitTwo (events.js:125:13)
gyp ERR! stack     at ChildProcess.emit (events.js:213:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Darwin 17.0.0
gyp ERR! command "/Volumes/iMac HDD/Rijk/.meteor/packages/meteor-tool/.1.6.0.1tp1xc0++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/bin/node" "/Volumes/iMac HDD/Rijk/.meteor/packages/meteor-tool/.1.6.0.1tp1xc0++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Volumes/iMac HDD/Rijk/Code/Projects/transmate/node_modules/bcrypt
gyp ERR! node -v v8.8.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok 
npm WARN transmate@1.0.0 No description
npm WARN transmate@1.0.0 No repository field.
npm WARN transmate@1.0.0 No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! bcrypt@0.8.7 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the bcrypt@0.8.7 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Volumes/iMac HDD/Rijk/.npm/_logs/2017-10-31T13_14_01_877Z-debug.log

Edit: this did the trick for me

meteor npm uninstall --save bcrypt
meteor npm i -S bcrypt

I experimented an extension of this issue (at least the same hints) during a deploy on Heroku.
If it’s useful for someone.

After updating from 1.5.2 to 1.6 and installing bcrypt through meteor npm install --save bcrypt (following the same message as Npm bcrypt and meteor npm bcrypt madness), I got an issue during a deploy on Heroku:

bcrypt@0.8.7 install /tmp/build_b2451433de0d0c8436fd56b8477f7a94/Ontokrat-Bob-27fbbb79d8f08abd380478310f9cd107406cbfe4/.meteor/heroku_build/app/programs/server/npm/node_modules/bcrypt
node-gyp rebuild
make: Entering directory '/tmp/build_b2451433de0d0c8436fd56b8477f7a94/Ontokrat-Bob-27fbbb79d8f08abd380478310f9cd107406cbfe4/.meteor/heroku_build/app/programs/server/npm/node_modules/bcrypt/build’
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
SOLINK_MODULE(target) Release/obj.target/bcrypt_lib.node
COPY Release/bcrypt_lib.node
make: Leaving directory '/tmp/build_b2451433de0d0c8436fd56b8477f7a94/Ontokrat-Bob-27fbbb79d8f08abd380478310f9cd107406cbfe4/.meteor/heroku_build/app/programs/server/npm/node_modules/bcrypt/build’
fibers@1.0.15 install /tmp/build_b2451433de0d0c8436fd56b8477f7a94/Ontokrat-Bob-27fbbb79d8f08abd380478310f9cd107406cbfe4/.meteor/heroku_build/app/programs/server/npm/node_modules/fibers
node build.js || nodejs build.js
linux-x64-57 exists; testing
Binary is fine; exiting
npm ERR! Invalid version: "https://registry.npmjs.org/agent-base/-/agent-base-2.1.1.tgz"
npm ERR! A complete log of this run can be found in:
npm ERR! /app/.npm/_logs/2017-11-03T23_02_31_333Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! meteor-dev-bundle@0.0.0 install: node npm-rebuild.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the meteor-dev-bundle@0.0.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /app/.npm/_logs/2017-11-03T23_02_31_371Z-debug.log
! Push rejected, failed to compile Node.js app.
! Push failed

I just performed (and nothing else), according to @ralpheiligan advices, a meteor npm rebuild and

I don’t know why, but it made me jump (package.json) from "bcrypt": "^0.8.7" to "bcrypt": "^1.0.3"

After a new push, everything was back to normal, the build passed fine:

bcrypt@1.0.3 install /tmp/build_59afe435de8887940680bdd38395a5fa/Ontokrat-Bob-59d08d1c538ca9828e67454fe21874beaa3d6b98/.meteor/heroku_build/app/programs/server/npm/node_modules/bcrypt
node-pre-gyp install --fallback-to-build
[bcrypt] Success: “/tmp/build_59afe435de8887940680bdd38395a5fa/Ontokrat-Bob-59d08d1c538ca9828e67454fe21874beaa3d6b98/.meteor/heroku_build/app/programs/server/npm/node_modules/bcrypt/lib/binding/bcrypt_lib.node” is installed via remote

I would certainly recommend installing a newer version of bcrypt as 0.8.7 is not current (and may only be designed for older Node verisons. Running:

meteor npm install bcrypt@latest --save

…might fix the problem?

On MacOS 10.13.6 with the latest Xcode installed and METEOR@1.7.0.5 it tries to download the wrong version of bcrypt from github (node-v57) and then proceeds to try to build it and fails. How can I make it so it downloads an existing pre-built version?

jmangold at Jans-MacBook-Pro in ~/M/b                                                                                             15:19:45
 meteor npm install bcrypt@latest --save

> bcrypt@3.0.0 install /Users/jmangold/Meteor/b/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-v57-darwin-x64-unknown.tar.gz 
node-pre-gyp WARN Pre-built binaries not found for bcrypt@3.0.0 and node@8.11.4 (node-v57 ABI, unknown) (falling back to source compile with node-gyp) 
.
.
.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! bcrypt@3.0.0 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the bcrypt@3.0.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Meteor 1.7.0.5 ships with node v8.11.4 which uses API version 57

So it was trying to download the correct version of bcrypt for that version of Meteor
https://nodejs.org/en/download/releases/

The reason it couldn’t download a pre-built binary is because bcrypt didn’t build a macOS binary for bcrypt 3 on node 8
https://github.com/kelektiv/node.bcrypt.js/releases/

You can get a prebuilt of bcrypt@2.0.1 though:

meteor npm install bcrypt@2.0.1

What errors were you getting on the compilation attempt?
Have you got the required dependecies? https://github.com/nodejs/node-gyp#on-macos

1 Like

Thank you @coagmano, that makes sense. Here is (what I think) the most important failure when it is trying to install from source

gyp info spawn /usr/bin/python
gyp info spawn args [ '/Users/jmangold/.meteor/packages/meteor-tool/.1.7.0_5.19pr45f.7esr++os.osx.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/jmangold/.meteor/packages/meteor-tool/.1.7.0_5.19pr45f.7esr++os.osx.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/.bin/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/jmangold/.meteor/packages/meteor-tool/.1.7.0_5.19pr45f.7esr++os.osx.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/jmangold/.node-gyp/10.4.0/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/Users/jmangold/.node-gyp/10.4.0',
gyp info spawn args   '-Dnode_gyp_dir=/Users/jmangold/.meteor/packages/meteor-tool/.1.7.0_5.19pr45f.7esr++os.osx.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/Users/jmangold/.node-gyp/10.4.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/Users/jmangold/.meteor/packages/meteor-tool/.1.7.0_5.19pr45f.7esr++os.osx.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/.bin',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.' ]
gyp: binding.gyp not found (cwd: /Users/jmangold/.meteor/packages/meteor-tool/.1.7.0_5.19pr45f.7esr++os.osx.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/.bin) while trying to load binding.gyp
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/Users/jmangold/.meteor/packages/meteor-tool/.1.7.0_5.19pr45f.7esr++os.osx.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/node-gyp/lib/configure.js:336:16)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12)
gyp ERR! System Darwin 17.7.0
gyp ERR! command "/usr/local/Cellar/node/10.4.0/bin/node" "/Users/jmangold/.meteor/packages/meteor-tool/.1.7.0_5.19pr45f.7esr++os.osx.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/.bin/node-gyp" "configure"
gyp ERR! cwd /Users/jmangold/.meteor/packages/meteor-tool/.1.7.0_5.19pr45f.7esr++os.osx.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/.bin
gyp ERR! node -v v10.4.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok 

Haven’t seen that one before!

It looks like it’s using the system node (node -v v10.4.0) to build, which might be causing the issue?
Are you running npm install or meteor npm install?

I am running meteor npm install and it seems binding.gyp can’t be found, which breaks the node-gyp build. When I do the same thing on my Mountain Lion Mac Pro at home it works

jhm at macpro in ~/M/test17                                                                                                                                               17:55:59
 m npm install bcrypt --save

> bcrypt@3.0.0 install /Users/jhm/Meteor/test17/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-v57-darwin-x64-unknown.tar.gz 
node-pre-gyp WARN Pre-built binaries not found for bcrypt@3.0.0 and node@8.11.4 (node-v57 ABI, unknown) (falling back to source compile with node-gyp) 
  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
  SOLINK_MODULE(target) Release/bcrypt_lib.node
  COPY /Users/jhm/Meteor/test17/node_modules/bcrypt/lib/binding/bcrypt_lib.node
  TOUCH Release/obj.target/action_after_build.stamp
+ bcrypt@3.0.0
added 71 packages from 49 contributors and audited 699 packages in 12.331s
found 0 vulnerabilities

Did you find a solution to this?

The solution to this is to have node gyp build tools installed.

For macOS, have XCode and command line tools installed seems to be enough. (Make sure to run Xcode at least once to finish set up)

For Linux (Ubuntu/Debian specifically) sudo apt-get install build-essential - it’ll probably be similar on other Linux platforms - check the notes for node-gyp.

For Windows, install node, then use npm i -g windows-build-tools which will fetch the necessary things to get everything building. You might be able to use meteor’s bundled version of node to do the same - I haven’t tried it (meteor npm i -g windows-build-tools).

3 Likes

Still randomly getting this error. Super frustrating that going into 2019 that this error pops up all the time for no reason. I’ve installed bcrypt more times than I can count.

I still have this problem.
I try any solution via these issue, but still not work.
(Base on Meteor 1.4x)

> bcrypt@3.0.3 install /Volumes/DATA/MeteorApp/microfis/node_modules/bcrypt
> node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp WARN Tried to download(404): https://github.com/kelektiv/node.bcrypt.js/releases/download/v3.0.3/bcrypt_lib-v3.0.3-node-v46-darwin-x64-unknown.tar.gz
node-pre-gyp WARN Pre-built binaries not found for bcrypt@3.0.3 and node@4.6.2 (node-v46 ABI, unknown) (falling back to source compile with node-gyp)
  CXX(target) Release/obj.target/bcrypt_lib/src/blowfish.o
warning: include path for stdlibc++ headers not found; pass '-std=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
1 warning generated.
  CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt.o
warning: include path for stdlibc++ headers not found; pass '-std=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
1 warning generated.
  CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt_node.o
warning: include path for stdlibc++ headers not found; pass '-std=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
In file included from ../src/bcrypt_node.cc:1:
../../nan/nan.h:56:10: fatal error: 'algorithm' file not found
#include <algorithm>
         ^~~~~~~~~~~
1 warning and 1 error 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 (/Users/theara/.meteor/packages/meteor-tool/.1.4.2_2.dygc1p.l12lu++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/node-gyp/lib/build.js:276: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:211:12)
gyp ERR! System Darwin 18.2.0
gyp ERR! command "/Users/theara/.meteor/packages/meteor-tool/.1.4.2_2.dygc1p.l12lu++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/bin/node" "/Users/theara/.meteor/packages/meteor-tool/.1.4.2_2.dygc1p.l12lu++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Volumes/DATA/MeteorApp/microfis/node_modules/bcrypt/lib/binding/bcrypt_lib.node" "--module_name=bcrypt_lib" "--module_path=/Volumes/DATA/MeteorApp/microfis/node_modules/bcrypt/lib/binding" "--node_abi_napi=node-v46" "--napi_build_version=0" "--node_napi_label=node-v46"
gyp ERR! cwd /Volumes/DATA/MeteorApp/microfis/node_modules/bcrypt
gyp ERR! node -v v4.6.2
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/Users/theara/.meteor/packages/meteor-tool/.1.4.2_2.dygc1p.l12lu++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/bin/node /Users/theara/.meteor/packages/meteor-tool/.1.4.2_2.dygc1p.l12lu++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Volumes/DATA/MeteorApp/microfis/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/Volumes/DATA/MeteorApp/microfis/node_modules/bcrypt/lib/binding --node_abi_napi=node-v46 --napi_build_version=0 --node_napi_label=node-v46' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Volumes/DATA/MeteorApp/microfis/node_modules/bcrypt/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at emitTwo (events.js:87:13)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:854:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:222:5)
node-pre-gyp ERR! System Darwin 18.2.0
node-pre-gyp ERR! command "/Users/theara/.meteor/packages/meteor-tool/.1.4.2_2.dygc1p.l12lu++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/bin/node" "/Volumes/DATA/MeteorApp/microfis/node_modules/bcrypt/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Volumes/DATA/MeteorApp/microfis/node_modules/bcrypt
node-pre-gyp ERR! node -v v4.6.2
node-pre-gyp ERR! node-pre-gyp -v v0.12.0
node-pre-gyp ERR! not ok
Failed to execute '/Users/theara/.meteor/packages/meteor-tool/.1.4.2_2.dygc1p.l12lu++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/bin/node /Users/theara/.meteor/packages/meteor-tool/.1.4.2_2.dygc1p.l12lu++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Volumes/DATA/MeteorApp/microfis/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/Volumes/DATA/MeteorApp/microfis/node_modules/bcrypt/lib/binding --node_abi_napi=node-v46 --napi_build_version=0 --node_napi_label=node-v46' (1)
npm ERR! Darwin 18.2.0
npm ERR! argv "/Users/theara/.meteor/packages/meteor-tool/.1.4.2_2.dygc1p.l12lu++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/bin/node" "/Users/theara/.meteor/packages/meteor-tool/.1.4.2_2.dygc1p.l12lu++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/bin/npm" "install" "--save" "bcrypt"
npm ERR! node v4.6.2
npm ERR! npm  v3.10.9
npm ERR! code ELIFECYCLE

npm ERR! bcrypt@3.0.3 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bcrypt@3.0.3 install script 'node-pre-gyp install --fallback-to-build'.
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-pre-gyp install --fallback-to-build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs bcrypt
npm ERR! Or if that isn't available, 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: