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

Error: Can't find npm module 'bcrypt'.? #5009

Closed
charliegn opened this issue Aug 21, 2015 · 13 comments
Closed

Error: Can't find npm module 'bcrypt'.? #5009

charliegn opened this issue Aug 21, 2015 · 13 comments

Comments

@charliegn
Copy link

I'm running Meteor 1.1.0.3 locally and out of no where every branch of my project is throwing the same error when Meteor starts up which makes me think that there is something deeper going on that I waned to bring to your attention. Another one of our production Meteor app is also getting this error? Any ideas?

I've cleansed the directory paths to just 'myApp' for security reasons

W20150821-08:26:27.582(-5)? (STDERR)          
W20150821-08:26:27.583(-5)? (STDERR) /myApp/.meteor/packages/meteor-tool/.1.1.3.6mfum3++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:245
W20150821-08:26:27.752(-5)? (STDERR)                            throw(ex);
W20150821-08:26:27.752(-5)? (STDERR)                                  ^
W20150821-08:26:27.752(-5)? (STDERR) Error: Can't find npm module 'bcrypt'. Did you forget to call 'Npm.depends' in package.js within the 'npm-bcrypt' package?
W20150821-08:26:27.752(-5)? (STDERR)     at Object.Npm.require (/myApp/.meteor/local/build/programs/server/boot.js:155:17)
W20150821-08:26:27.752(-5)? (STDERR)     at Package (packages/npm-bcrypt/wrapper.js:1:1)
W20150821-08:26:27.752(-5)? (STDERR)     at /myApp/.meteor/local/build/programs/server/packages/npm-bcrypt.js:21:4
W20150821-08:26:27.753(-5)? (STDERR)     at /myApp/.meteor/local/build/programs/server/packages/npm-bcrypt.js:30:3
W20150821-08:26:27.753(-5)? (STDERR)     at /myApp/.meteor/local/build/programs/server/boot.js:222:10
W20150821-08:26:27.753(-5)? (STDERR)     at Array.forEach (native)
W20150821-08:26:27.753(-5)? (STDERR)     at Function._.each._.forEach (/myApp/.meteor/packages/meteor-tool/.1.1.3.6mfum3++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/underscore/underscore.js:79:11)
W20150821-08:26:27.753(-5)? (STDERR)     at /myApp/.meteor/local/build/programs/server/boot.js:117:5

Thank you!

@charliegn
Copy link
Author

FIXED the issue. I'm curious as to why this ended up being necessary but from this article accounts-password from meteor breaking because of bcrypt I was able to fix the error and the meteor app starting running just fine...

After looking in the cd programs/server/npm/npm-bcrypt/node_modules/ directory there was no bcryptdirectory present. So I did the following:

cd programs/server/npm/npm-bcrypt/node_modules/
rm -rf bcrypt  // I didn't need to do this step since 'bcrypt' was missing for me
npm install bcrypt

@t3db0t
Copy link

t3db0t commented Oct 9, 2015

I just had this problem too—completely out of nowhere. No idea what caused it, but I npm installed bcrypt just as above and it worked.

Kind of disturbing, anyone have any idea what would have caused this?

@stubailo
Copy link
Contributor

Interesting - if anyone comes up with a way to reproduce this, I'll take another look.

@taky2
Copy link

taky2 commented Oct 22, 2015

@stubailo I am having the same issue on OSX 10.11.1 and looking into the project directory I can navigate to .meteor/local/build/programs/server/npm/npm-bcrypt/ inside here I find a broken alias to node_modules which doesn't even display as a folder in finder. So I deleted it, created a folder called node_modules then found the global hidden .npm directory at ~/.npm/bcrypt I copied this bcrypt folder and pasted it into the newly created node_modules folder. Relaunching meteor, it seems to have updated the node_modules reference, and the public/private buttons appear to be working.

This became an issue during the last steps of this tutorial: https://github.com/meteor/simple-todos-angular

@lfilho
Copy link

lfilho commented Nov 11, 2015

This also happened to me, Meteor 1.2.1, OSX, Node 5.0.0.

I fixed it by running rm -rf ~/.meteor/packages/npm-bcrypt.

Then after running meteor it downloaded bcrypt again and all was fine.

@metsak
Copy link

metsak commented Nov 23, 2015

Just happened to me and no idea what triggered it. Running Meteor 1.2.1. Fixed it by restarting server.

@mmazloum
Copy link

Just got the same trouble, re-running meteor fixed the problem.

How if someone interested here is the error from my terminal :
W20151126-16:59:37.696(1)? (STDERR)
W20151126-16:59:37.696(1)? (STDERR) /Users/marwanmazloum/.meteor/packages/meteor-tool/.1.1.10.17jl6pu++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:245
W20151126-16:59:37.697(1)? (STDERR) throw(ex);
W20151126-16:59:37.697(1)? (STDERR) ^
W20151126-16:59:37.700(1)? (STDERR) Error: Can't find npm module 'bcrypt'. Did you forget to call 'Npm.depends' in package.js within the 'npm-bcrypt' package?
W20151126-16:59:37.701(1)? (STDERR) at Object.Npm.require (/Users/marwanmazloum/Desktop/Sites/startup-innovation/.meteor/local/build/programs/server/boot.js:175:17)
W20151126-16:59:37.701(1)? (STDERR) at Package (packages/npm-bcrypt/packages/npm-bcrypt.js:9:1)
W20151126-16:59:37.701(1)? (STDERR) at Package (packages/npm-bcrypt/packages/npm-bcrypt.js:13:1)
W20151126-16:59:37.701(1)? (STDERR) at /Users/marwanmazloum/Desktop/Sites/startup-innovation/.meteor/local/build/programs/server/packages/npm-bcrypt.js:33:4
W20151126-16:59:37.701(1)? (STDERR) at /Users/marwanmazloum/Desktop/Sites/startup-innovation/.meteor/local/build/programs/server/packages/npm-bcrypt.js:42:3
W20151126-16:59:37.701(1)? (STDERR) at /Users/marwanmazloum/Desktop/Sites/startup-innovation/.meteor/local/build/programs/server/boot.js:242:10
W20151126-16:59:37.701(1)? (STDERR) at Array.forEach (native)
W20151126-16:59:37.701(1)? (STDERR) at Function..each..forEach (/Users/marwanmazloum/.meteor/packages/meteor-tool/.1.1.10.17jl6pu++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/underscore/underscore.js:79:11)
W20151126-16:59:37.701(1)? (STDERR) at /Users/marwanmazloum/Desktop/Sites/startup-innovation/.meteor/local/build/programs/server/boot.js:137:5

@Tzaphkiel
Copy link

I have the same issue anytime I build my meteor application on a linux platform.
I literally have to construct the bundle (meteor build...) than do :

  • go to programs/server: npm install,
  • stay in this folder: npm uninstall fibers && npm install fibers
  • stay in the folder: rm -r ./npm/npm-bcrypt/node_modules/bcrypt && npm install bcrypt

Only then can I go to the root folder of the app and use node main.js to launch it !

@DaveEveritt
Copy link

This happened after I set up Facebook login to work locally, then uploaded the app to meteor.com and tried to run locally again. I removed the Facebook login code, commented accounts-facebook out in .meteor/packages and rebuilt. Perhaps connected?

@Tzaphkiel
Copy link

Not as far as I can see, the accounts-facebook was never installed in my application although I had some other accounts setup such as google, github, ...

@jonathanazulay
Copy link

I had the same problem, deleting~/.meteor/packages solved it.

@mitar
Copy link
Contributor

mitar commented Jul 31, 2016

Happened to me as well.

@mitar
Copy link
Contributor

mitar commented Jul 31, 2016

It is trying to install bcrypt@0.7.7 though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests