New Meteor app crashes after adding accounts-password

Iā€™m having a problem when I add accounts-password to ANY newly created meteor app that is causes the app to crash.

I get:

Steps to reproduce:

  1. meteor create myTestApp

  2. I then launch the app and I get the Welcome to Meteor page in my browser.

  3. In a new terminal window, I do meteor add accounts-ui and add {{> loginButtons}} right below {{> hello}}

  4. The app still runs fine, but I see ā€œNo login services configuredā€ as expected.

  5. I then do meteor add accounts-password - crash!

    W20160118-20:51:19.763(-6)? (STDERR)
    W20160118-20:51:19.764(-6)? (STDERR) /Users/geraldbailey/.meteor/packages/meteor-tool/.1.1.10.ta2bmn++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:245
    W20160118-20:51:19.765(-6)? (STDERR) throw(ex);
    W20160118-20:51:19.765(-6)? (STDERR) ^
    W20160118-20:51:19.765(-6)? (STDERR) Error: Canā€™t find npm module ā€˜bcryptā€™. Did you forget to call ā€˜Npm.dependsā€™ in package.js within the ā€˜npm-bcryptā€™ package?
    W20160118-20:51:19.765(-6)? (STDERR) at Object.Npm.require (/Users/geraldbailey/Desktop/Recordly/.meteor/local/build/programs/server/boot.js:175:17)
    W20160118-20:51:19.765(-6)? (STDERR) at Package (packages/npm-bcrypt/packages/npm-bcrypt.js:9:1)
    W20160118-20:51:19.765(-6)? (STDERR) at Package (packages/npm-bcrypt/packages/npm-bcrypt.js:13:1)
    W20160118-20:51:19.765(-6)? (STDERR) at /Users/geraldbailey/Desktop/Recordly/.meteor/local/build/programs/server/packages/npm-bcrypt.js:33:4
    W20160118-20:51:19.766(-6)? (STDERR) at /Users/geraldbailey/Desktop/Recordly/.meteor/local/build/programs/server/packages/npm-bcrypt.js:42:3
    W20160118-20:51:19.766(-6)? (STDERR) at /Users/geraldbailey/Desktop/Recordly/.meteor/local/build/programs/server/boot.js:242:10
    W20160118-20:51:19.766(-6)? (STDERR) at Array.forEach (native)
    W20160118-20:51:19.766(-6)? (STDERR) at Function..each..forEach (/Users/geraldbailey/.meteor/packages/meteor-tool/.1.1.10.ta2bmn++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/underscore/underscore.js:79:11)
    W20160118-20:51:19.766(-6)? (STDERR) at /Users/geraldbailey/Desktop/Recordly/.meteor/local/build/programs/server/boot.js:137:5
    => Exited with code: 8

Iā€™m a noob, but seems like this should just work. Iā€™ve even done meteor update to make sure all was up to date and Iā€™m told it is.

Thoughts on how to get around this??

Iā€™ve seen this before. Go into your project root folder, and do:

rm -rf .meteor/local

Followed by:

rm -rf ~/.meteor

Sometimes Meteor projects and/or your local package repository gets corrupt. This will clear everything out.

2 Likes

Thank you SO much @ffxsam, that absolutely fixed my problem! :smile:

1 Like

Perhaps worth noting that this completely wipes your DB? :stuck_out_tongue:

1 Like

Erā€¦ yes. By the way, this wipes out your local DB! :slight_smile:

2 Likes

Yep, which is fine as Iā€™m just starting out and I have a fixtures file. And hey, at least it works now! :smile:

I tried this but still i get errors like

Cannot read property 'Blaze' of undefined

And

Cannot read property 'Template' of undefined

after adding accounts-ui/accounts-password packages, anything else i can try ?