Could not start towerjs server after creating new application "Unable to find mongodb module"

I am a newbie node and just started playing with it. Since I used rails honestly, before I want to use a framework on node, which is built on the same principles as rails. Tower.js seems to be suitable for counting, so I installed it and created a new application just like with rails. When I try to start the server, I get the following error:

$ tower server -e development
node.js:201
    throw e; // process.nextTick error, or 'error' event on first tick
          ^
Error: Cannot find module 'mongodb'
    at Function._resolveFilename (module.js:334:11)
    at Function._load (module.js:279:25)
    at Module.require (module.js:357:17)
    at require (module.js:368:17)
    at Function.lib (/usr/local/lib/node_modules/tower/lib/tower/server/store/mongodb/configuration.js:36:14)
    at Function.initialize (/usr/local/lib/node_modules/tower/lib/tower/server/store/mongodb/database.js:28:22)
    at App.<anonymous> (/usr/local/lib/node_modules/tower/lib/tower/server/store/mongodb.js:46:30)
    at Callback.run (/usr/local/lib/node_modules/tower/lib/tower/support/callbacks.js:207:23)
    at /usr/local/lib/node_modules/tower/lib/tower/support/callbacks.js:117:23
    at /usr/local/lib/node_modules/tower/lib/tower/application/shared.js:164:14

I have already tried the following:

  • Launch the node console and request ('mongodb'). It works!
  • Make sure mongo is up and running on port 27017 as defined in my databases. coffee
  • I can run the application using the command node server.js

Here are the versions of node, npm and tower that I have,

  • node - v0.6.8
  • npm - 1.1.18
  • tower - 0.4.0-10
+3

All Articles