how to install bcrypt?

228 views
Skip to first unread message

marco....@gmail.com

unread,
Nov 15, 2016, 3:35:09 AM11/15/16
to NodeChef
Hey there,

in the app-logs i see the following:

in the root directory of your application. 
meteor npm install --save bcrypt 

In order to use the native implementation instead, run [...]

adding bcrypt to package.json dependencies not solves the issue.
How to get bcrypt installed?

Regards
Marco

Marco Michely

unread,
Nov 15, 2016, 3:42:29 AM11/15/16
to NodeChef
oh, i have to say: it's a meteor app.

dev.no...@gmail.com

unread,
Nov 15, 2016, 7:56:22 AM11/15/16
to NodeChef
Can you run that command locally instead and deploy. Most deployments we have seen have a file npm-rebuilds.json, under programs/server we use that file to rebuild the bcrypt binary on the server if it is in there.

Marco Michely

unread,
Nov 15, 2016, 11:59:03 AM11/15/16
to NodeChef, dev.no...@gmail.com

On Tuesday, November 15, 2016 at 1:56:22 PM UTC+1, dev.no...@gmail.com wrote:
Can you run that command locally instead and deploy.

i've done that already. now again.
 
Most deployments we have seen have a file npm-rebuilds.json, under programs/server we use that file to rebuild the bcrypt binary on the server if it is in there.

"meteor build"  generates a tar.gz and i have not changed anything inside it.
Running  "meteor npm rebuild" locally does not help also.

Matej Jan

unread,
Jan 21, 2017, 3:43:14 PM1/21/17
to NodeChef
I'm having the same problem with bcrypt. Additionally, other NPM modules that my Meteor app depends on are also missing.

Under Meteor 1.3, npm modules are installed directly with meteor npm install instead of the previous way of running Npm.require in package.json of the packages (which still works on NodeChef now).

The error I get comes from here:

at Object.require (/bundle/programs/server/boot.js:168:18) 
at require (internal/module.js:12:17) 
at Module.require (module.js:353:17) 
at Function.Module._load (module.js:276:25) 
at Function.Module._resolveFilename (module.js:325:15) 
Error: Cannot find module 'twit' 


throw error; 
/bundle/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:190

This is the new Modules system in Meteor 1.3. Looking at the generated meteor build (tar.gz) the file you're referring to, npm-rebuilds.json, only has 'npm' in there. Adding 'twit' into the npm-rebuilds manually didn't help either. However, node_modules directory in there already includes builds for npm packages (twit is there). 

So I'm not sure exactly what's going on, but I'd ask if you could test your deployment scripts with an empty meteor app that just depends on some external npm package. Hopefully if you can get this fixed, the bcrypt dependency will be fixed at the same time.

Let me know how I can help.

dev.no...@gmail.com

unread,
Jan 21, 2017, 9:42:38 PM1/21/17
to NodeChef
If you know the path to the node_modules folder which contains twit in your tar.gz, you can simply under App actions > environment variables, set t he NODE_PATH to this folder.

so for example if in the archive twit can be found in /program/server/node_modules. You can set the NODE_PATH to /bundle/program/server/node_modules.


dev.no...@gmail.com

unread,
Apr 21, 2017, 10:45:03 AM4/21/17
to NodeChef
This issue should be resolved. All new deployments should have native bcrypt installed. Please update if you continue to face the issue on all new deployments.
Reply all
Reply to author
Forward
0 new messages