Demeteorized App ... Error ... Error: Can't find npm module 'bcrypt'. Did you forget to call 'Npm.depends' in package.js within the 'npm-bcrypt' package?

Error: Can’t find npm module ‘bcrypt’. Did you forget to call ‘Npm.depends’ in package.js within the ‘npm-bcrypt’ package?
at Object.Npm.require (/var/www/theidd/bundle/programs/server/boot.js:175:17)
at packages/npm-bcrypt/packages/npm-bcrypt.js:9:1
at packages/npm-bcrypt/packages/npm-bcrypt.js:13:1
at /var/www/theidd/bundle/programs/server/packages/npm-bcrypt.js:33:4
at /var/www/theidd/bundle/programs/server/packages/npm-bcrypt.js:42:3
at /var/www/theidd/bundle/programs/server/boot.js:242:10
at Array.forEach (native)
at Function..each..forEach (/var/www/theidd/bundle/programs/server/node_modules/underscore/underscore.js:79:11)
at /var/www/theidd/bundle/programs/server/boot.js:137:5
Error ID

You probably need to recompile bcrypt for your platform.

Just try to build the npms

cd /var/www/theidd/bundle/programs/server/
npm install

and run your app again

If you do

meteor build --directory /var/www/theidd

you need to run the above all times you re-run the build

That didn’t do the trick … is there a way to blow away bcrypt and re-build it ?

I tried … as the correct user on a 'Nix system

cd programs/server/
npm install bcrypt

That worked … and then I’m back to an issue with fibers@1.0.5 … at Digital Ocean on Ubuntu 14.04 LTS

theidd@theidd:/var/www/theidd/bundle$ node main.js

MongoError: auth fails
at Object.Future.wait (/var/www/theidd/bundle/programs/server/node_modules/f ibers/future.js:398:15)
at new MongoConnection (packages/mongo/mongo_driver.js:213:1)
at new MongoInternals.RemoteCollectionDriver (packages/mongo/remote_collecti on_driver.js:4:1)
at Object. (packages/mongo/remote_collection_driver.js:38:1)
at Object.defaultRemoteCollectionDriver (packages/underscore/underscore.js:7 50:1)
at new Mongo.Collection (packages/mongo/collection.js:102:1)
at AccountsServer.AccountsCommon (accounts_common.js:23:18)
at new AccountsServer (accounts_server.js:16:5)
at globals_server.js:5:12
at /var/www/theidd/bundle/programs/server/packages/accounts-base.js:1814:4
- - - - -
at Object.toError (/var/www/theidd/bundle/programs/server/npm/npm-mongo/node _modules/mongodb/lib/mongodb/utils.js:114:11)
at /var/www/theidd/bundle/programs/server/npm/npm-mongo/node_modules/mongodb /lib/mongodb/db.js:1196:31
at /var/www/theidd/bundle/programs/server/npm/npm-mongo/node_modules/mongodb /lib/mongodb/db.js:1905:9
at Server.Base._callHandler (/var/www/theidd/bundle/programs/server/npm/npm- mongo/node_modules/mongodb/lib/mongodb/connection/base.js:453:41)
at /var/www/theidd/bundle/programs/server/npm/npm-mongo/node_modules/mongodb /lib/mongodb/connection/server.js:488:18
at [object Object].MongoReply.parseBody (/var/www/theidd/bundle/programs/ser ver/npm/npm-mongo/node_modules/mongodb/lib/mongodb/responses/mongo_reply.js:68:5 )
at [object Object]. (/var/www/theidd/bundle/programs/server/npm/n pm-mongo/node_modules/mongodb/lib/mongodb/connection/server.js:446:20)
at [object Object].emit (events.js:107:17)
at [object Object]. (/var/www/theidd/bundle/programs/server/npm/n pm-mongo/node_modules/mongodb/lib/mongodb/connection/connection_pool.js:207:13)
at [object Object].emit (events.js:110:17)

Sorry, no experiences with using it on windows yet!

For this production installation we are on a box at Digital Ocean runing Ubuntu 14.04 LTS

Ok, thats better to my knowledge :wink:

On what machine do you develop and build the bundle of your app?

I develop on a Windows box and I haven’t connected to an external MONGO_URL … … it’s really just a demo app.

Then after Demeteorizer I’m attempting it … I’m thinking I need to master connection to an external instance of mongodb before moving the app to the server.

Ok, for me it sound that you have to build on a compatible environment. Just try to install meteor on your Ubuntu and do the build on that machine like you already did.

  1. Install meteor on Ubuntu
  2. Put your source somewhere
  3. Go into your sources directory
  4. meteor clean # clean up .meteor/local
  5. meteor build --directory /path/to/build
  6. cd path/to/build/bundle/program/server
  7. npm install
  8. cd path/to/build/bundle
  9. run main.js as described in README

Should work.

1 Like

Wisdom … Stepping back and doing as you suggest …

This has been helpful … it shows that our meteor app just ins’t ready … I went back to first principles …

I create a known good app …

meteor create simple-todos

and deployed that into production …

No Problems !!!

So, I’m confident that we can build up step-by-step from here …

Thanks, Everyone !!

Also one thing for the future (sounds like you fixed it)… One thing that does that for me is when the version of Node on the server doesn’t match the range for that release of Meteor. If you’re using MUP to deploy, fixing the version in the config and then doing a mup setup has cleared it up for me.

I wouldn’t say I “fixed it” … I punted … and then I gave up.

Deployment for Meteor is a Black Art. The transmogrification to a node app is FAR from perfect or even sane today.

It’s not “Soup” yet is an understaement.

I wanted to use Passenger from Phusion and I still plan to do so, but only if they give me a startup company discount and still … most of my issues have nothing to do with Passenger …

Running an application under Meteor is NOT like running it under node directly … it just isn’t … That’s why I think Galaxy hosting will actually be quite popular.

If you look at Galaxy hosting from Meteor and the price point ( $495/mo paid ANNUALLY) it seems that they are out of touch with what other people are charging for hosting.

What the hell are they smoking ?

But … when you meet the difficulties head-on, as I have done, and I have the bruises to prove it, you begin to see that they are not so crazy.

I’m contemplating starting a company with real money … and peoples lives and families … on the line and I’ve read about horror story after horror story of reasonably intelligent engineers having the rug pulled out from under them on relatively innocuous updates … x.x.2 or x.1 updates … Then BLAM !!!

Meteor deployment in general, sucks … at this time in it’s development.

Gotcha. Yea I would just fork out the $15/mo for Modulus so that it’s easy to get going. I’ve tried Phusion and had a hard time getting it to run consistently… it was more trouble than it’s worth.

Moved to your new thread to prevent duplicated content: The state of Meteor deployment is very unfriendly. Is it wrong of me to think that?