Cannot find module 'mongodb'

This time, it is not an ADF topic, sorry ;)
While trying out some samples on MongoDB and Node.JS, I ran in to a very basic error
       
Error: Cannot find module 'mongodb'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)

The solution has been discussed in this thread http://stackoverflow.com/questions/14226410/node-js-noob-cannot-fine-module-mongodb
To summarize solution from the above thread, you may want to do the following:
  • npm install mongodb -g
  • cd /path/to/app/folder
  • npm link mongodb

Comments

Disclaimer

The views expressed on this blog are my own and do not necessarily reflect the views of my employer.