[SOLVED] Can't get rid of "pure JavaScript" bcrypt warning


I’m getting this when I run Meteor:

W20161201-16:45:16.741(-8)? (STDERR) Note: you are using a pure-JavaScript implementation of bcrypt.
W20161201-16:45:16.742(-8)? (STDERR) While this implementation will work correctly, it is known to be
W20161201-16:45:16.742(-8)? (STDERR) approximately three times slower than the native implementation.
W20161201-16:45:16.742(-8)? (STDERR) In order to use the native implementation instead, run
W20161201-16:45:16.742(-8)? (STDERR)
W20161201-16:45:16.743(-8)? (STDERR)   meteor npm install --save bcrypt
W20161201-16:45:16.743(-8)? (STDERR)
W20161201-16:45:16.743(-8)? (STDERR) in the root directory of your application.

No matter what I try, I can’t get rid of it. I’ve cleared out ~/.meteor, .meteor/local/bundler-cache, wiped the build folder. Nothing works. I definitely have the npm version of bcrypt installed.

If I run meteor shell and require bcrypt, I get an error:

> bcrypt = require('bcrypt')
        throw e
Error: Module version mismatch. Expected 46, got 48.

If I run the require statement in node, it works fine.


Weird. I always run npm vs meteor npm, and never had a problem. This time, I just tried meteor npm i --save bcrypt and it fixed it. Why would that be? The only thing I can think of is that my system-level node is 6.9.1 and Meteor’s is 4.6.2, and Meteor’s node doesn’t like the version of bindings installed for Node 6.


@ffxsam great finding - thanks - I confirm - it works for me now on Windows 10, 64bit, Meteor 1.5.1 :slight_smile: